Exemplo n.º 1
0
void LocatedEntitytest::test_setProperty()
{
    std::string test_property("test_property");
    ASSERT_TRUE(m_entity->m_properties.find(test_property) ==
                m_entity->m_properties.end());

    PropertyBase * tp = new SoftProperty;

    m_entity->setProperty(test_property, tp);

    ASSERT_TRUE(m_entity->m_properties.find(test_property) !=
                m_entity->m_properties.end());
}
Exemplo n.º 2
0
void LocatedEntitytest::test_removeAttr()
{
    std::string test_property("test_property");
    LocatedEntity* entity = new LocatedEntityTest("1", 1);

    ASSERT_TRUE(!m_TestProperty_remove_called);

    PropertyBase * tp = new TestProperty();

    entity->setProperty(test_property, tp);

    ASSERT_TRUE(!m_TestProperty_remove_called);
    delete entity;
    ASSERT_TRUE(m_TestProperty_remove_called);
}