+ unsigned int expectedId1 = 241;
+ unsigned int expectedId2 = 242;
+ unsigned int expectedId3 = 243;
+ Surface* s1;
+ Surface* s2;
+ Surface* s3;
+
+ /// try to get surfaces, when no surfaces exist in scene
+ ASSERT_EQ(0, m_pScene->getAllSurfaces().size());
+
+ /// add 3 surfaces to scene
+ s1 = m_pScene->createSurface(expectedId1);
+ s2 = m_pScene->createSurface(expectedId2);
+ s3 = m_pScene->createSurface(expectedId3);
+
+ /// get all surfaces
+ const SurfaceMap& smap1 = m_pScene->getAllSurfaces();
+ ASSERT_EQ(3, smap1.size());
+ // order is undefined here, but each surface must be contained once
+ EXPECT_EQ(1, smap1.count(expectedId1));
+ EXPECT_EQ(1, smap1.count(expectedId2));
+ EXPECT_EQ(1, smap1.count(expectedId3));
+
+ /// remove 2 surfaces again
+ m_pScene->removeSurface(s1);
+ m_pScene->removeSurface(s3);
+
+ /// check, if the remaining surface is the expected one
+ const SurfaceMap& smap2 = m_pScene->getAllSurfaces();
+ ASSERT_EQ(1, smap2.size());
+ EXPECT_EQ(1, smap2.count(expectedId2));