Unit Test
=========
**Coverage:** 100.0% (8 of 8 items OK)
.. _lobster-item-be5924b6ed162a239327dc0c78585b3b8e475bf7:
.. dropdown:: [OK] GoogleTest Test Foo:GetNumber
:class-title: sd-bg-success sd-text-white
.. pull-quote::
:Given: a default-constructed Foo instance
:When: GetNumber is called
:Then: it returns 42
.. raw:: html
**Traces to:**
* :ref:`SampleComponent.REQ\_COMP\_001 `
.. raw:: html
**Derived from:**
* :ref:`SampleComponent.REQ\_COMP\_001 `
.. raw:: html
**Source:** `unit\_1/foo\_test.cpp:20 <../../unit_1/foo_test.cpp#L20>`__
.. _lobster-item-57470b962ba3b15582b9fd45a43ebdf18fa82651:
.. dropdown:: [OK] GoogleTest Test Foo:IsFinal
:class-title: sd-bg-success sd-text-white
.. pull-quote::
:Given: the Foo class definition
:When: checking whether the class is extensible
:Then: it is declared final, preventing any subclassing
.. raw:: html
**Traces to:**
* :ref:`SampleComponent.REQ\_COMP\_002 `
.. raw:: html
**Derived from:**
* :ref:`SampleComponent.REQ\_COMP\_002 `
.. raw:: html
**Source:** `unit\_1/foo\_test.cpp:33 <../../unit_1/foo_test.cpp#L33>`__
.. _lobster-item-5abc4b5082386e96d9ef4a84fa5a0e22272af1cf:
.. dropdown:: [OK] GoogleTest Test Foo:IsFinalStaticAssert
:class-title: sd-bg-success sd-text-white
.. pull-quote::
:Given: the Foo class definition
:When: querying the type trait std::is_final for Foo
:Then: the trait reports true, confirming Foo cannot be subclassed
.. raw:: html
**Traces to:**
* :ref:`SampleComponent.REQ\_COMP\_002 `
.. raw:: html
**Derived from:**
* :ref:`SampleComponent.REQ\_COMP\_002 `
.. raw:: html
**Source:** `unit\_1/foo\_test.cpp:46 <../../unit_1/foo_test.cpp#L46>`__
.. _lobster-item-1e730e95e7e261caae6aefbbf03176b928bc7f77:
.. dropdown:: [OK] GoogleTest Test Foo:GetNumberViaConstInstance
:class-title: sd-bg-success sd-text-white
.. pull-quote::
:Given: a const default-constructed Foo instance
:When: GetNumber is called through a const reference
:Then: it still returns 42
.. raw:: html
**Traces to:**
* :ref:`SampleComponent.REQ\_COMP\_001 `
.. raw:: html
**Derived from:**
* :ref:`SampleComponent.REQ\_COMP\_001 `
.. raw:: html
**Source:** `unit\_1/foo\_test.cpp:59 <../../unit_1/foo_test.cpp#L59>`__
.. _lobster-item-c60287b1208acd0277b412c29ee62c32a9ce2c82:
.. dropdown:: [OK] GoogleTest Test Foo:InitializesToKnownValue
:class-title: sd-bg-success sd-text-white
.. pull-quote::
:Given: a default-constructed Foo instance
:When: GetNumber is called for the first time
:Then: it returns 42
.. raw:: html
**Traces to:**
* :ref:`SampleComponentExtra.REQ\_COMP\_EXTRA\_001 `
.. raw:: html
**Derived from:**
* :ref:`SampleComponentExtra.REQ\_COMP\_EXTRA\_001 `
.. raw:: html
**Source:** `unit\_1/foo\_test.cpp:73 <../../unit_1/foo_test.cpp#L73>`__
.. _lobster-item-6d50902d616d4bbb44ca691afd63ef1bc727bda3:
.. dropdown:: [OK] GoogleTest Test Foo:ValueConsistentAcrossReads
:class-title: sd-bg-success sd-text-white
.. pull-quote::
:Given: a const Foo instance
:When: GetNumber is called multiple times
:Then: the same value is returned on each call
.. raw:: html
**Traces to:**
* :ref:`SampleComponentExtra.REQ\_COMP\_EXTRA\_002 `
.. raw:: html
**Derived from:**
* :ref:`SampleComponentExtra.REQ\_COMP\_EXTRA\_002 `
.. raw:: html
**Source:** `unit\_1/foo\_test.cpp:87 <../../unit_1/foo_test.cpp#L87>`__
.. _lobster-item-00465759811de57070aa17ead58688899877f4b5:
.. dropdown:: [OK] GoogleTest Test Bar:AssertNumber
:class-title: sd-bg-success sd-text-white
.. pull-quote::
:Given: a Bar instance owning a Foo with value 42
:When: AssertNumber is called
:Then: it returns true
.. raw:: html
**Traces to:**
* :ref:`SampleComponent.REQ\_COMP\_003 `
* :ref:`SampleComponent.REQ\_COMP\_004 `
* :ref:`SampleComponent.REQ\_COMP\_005 `
.. raw:: html
**Derived from:**
* :ref:`SampleComponent.REQ\_COMP\_005 `
* :ref:`SampleComponent.REQ\_COMP\_004 `
* :ref:`SampleComponent.REQ\_COMP\_003 `
.. raw:: html
**Source:** `unit\_2/bar\_test.cpp:18 <../../unit_2/bar_test.cpp#L18>`__
.. _lobster-item-addc342ad25bd157acf9c9f37f9c63ed29ff8bd0:
.. dropdown:: [OK] GoogleTest Test Bar:Format
:class-title: sd-bg-success sd-text-white
.. pull-quote::
:Given: a Bar instance owning a Foo with value 42
:When: Format is called
:Then: it returns the human-readable string "42"
.. raw:: html
**Traces to:**
* :ref:`SampleComponent.REQ\_COMP\_006 `
.. raw:: html
**Derived from:**
* :ref:`SampleComponent.REQ\_COMP\_006 `
.. raw:: html
**Source:** `unit\_2/bar\_test.cpp:32 <../../unit_2/bar_test.cpp#L32>`__