BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
toyitemslattice.test.cpp File Reference

Implements class CLASS? More...

Include dependency graph for toyitemslattice.test.cpp:

Go to the source code of this file.

Classes

class  ToyItemsLatticeTest
 Test toy LatticeItem. More...
 

Functions

 TEST_F (ToyItemsLatticeTest, ToyItemsLatticeTest)
 Business logice (enabled/disabled). More...
 

Detailed Description

Implements class CLASS?

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)

Definition in file toyitemslattice.test.cpp.

Function Documentation

◆ TEST_F()

Business logice (enabled/disabled).

Definition at line 33 of file toyitemslattice.test.cpp.

34 {
36  auto lattice = model.insertItem<LatticeItem>();
37 
38  // by default integration flag is ON, rotation angle is disabled
39  EXPECT_TRUE(lattice->property<bool>(LatticeItem::P_INTEGRATION));
40  EXPECT_FALSE(lattice->getItem(LatticeItem::P_ROTATION_ANLE)->isEnabled());
41 
42  // switching integration OFF, checking that rotation is enabled
43  lattice->setProperty(LatticeItem::P_INTEGRATION, false);
44  EXPECT_TRUE(lattice->getItem(LatticeItem::P_ROTATION_ANLE)->isEnabled());
45 }
T * insertItem(SessionItem *parent=nullptr, const TagRow &tagrow={})
Inserts item into given parent under given tagrow.
Definition: sessionmodel.h:104
Represents a lattice.
Definition: toyitems.h:72

References ModelView::SessionModel::insertItem().

Here is the call graph for this function: