public void TestAddEntity() { SOController controller = SOController.Instance; // Instance should not be null Assert.NotNull(controller); // Clear the entities controller.ClearEntities(); // Add a SODesigner to the controller controller.AddEntity(new SODesigner("test")); // Entities should not be null Assert.NotNull(controller.Entities); // Entity count should be on 1 now Assert.AreEqual(1, controller.Entities.Count()); // Name of the entity should be "test" Assert.AreEqual("test", controller.Entities[0].Name); }
public void TestClearEntities() { SOController controller = SOController.Instance; // Instance should not be null Assert.NotNull(controller); // Add a SODesigner to the controller controller.AddEntity(new SODesigner("test")); // Entities should not be null Assert.NotNull(controller.Entities); // Number of entitities should now be higher than 0 Assert.Greater(controller.Entities.Count(), 0); // Clear the entities controller.ClearEntities(); // Number of entities should now be 0 Assert.AreEqual(0, controller.Entities.Count()); }