BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
containeritem.test.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // qt-mvvm: Model-view-view-model framework for large GUI applications
4 //
5 //! @file mvvm/tests/testmodel/containeritem.test.cpp
6 //! @brief Implements class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #include "google_test.h"
17 #include "test_utils.h"
18 #include <memory>
19 
20 using namespace ModelView;
21 
22 //! Test of ContainerItem.
23 
24 class ContainerItemTest : public ::testing::Test {
25 public:
27 };
28 
30 
31 TEST_F(ContainerItemTest, initialState)
32 {
33  ContainerItem item;
34  EXPECT_EQ(item.size(), 0);
35  EXPECT_TRUE(item.empty());
36 }
37 
39 {
40  ContainerItem item;
41 
42  // inserting two children
43  auto property = new PropertyItem;
44  item.insertItem(property, {"", 0});
45 
46  EXPECT_EQ(item.size(), 1);
47  EXPECT_FALSE(item.empty());
48 }
Test of ContainerItem.
Simple container to store any type of children.
Definition: containeritem.h:25
Item to carry concrete editable entity (e.g.
Definition: propertyitem.h:27
bool insertItem(SessionItem *item, const TagRow &tagrow)
Insert item into given tag under the given row.
Defines class CLASS?
TEST_F(ContainerItemTest, initialState)
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.
Defines class CLASS?