public void TestModel_ThrowsNoException_WhenCreated() { // Arrange ModelLocator modelLocator = new ModelLocator(); _parentGameObject = new GameObject(); // Act TestModel testModel = _parentGameObject.AddComponent <TestModel>(); // Assert Assert.That(testModel, Is.Not.Null); }
public void GetModel_ValueSameAs_AddModel() { // Arrange ModelLocator modelLocator = new ModelLocator(); TestModel testModel = new TestModel(); // Act modelLocator.AddModel(testModel); TestModel foundTestModel = modelLocator.GetModel <TestModel>(); // Assert Assert.That(foundTestModel, Is.SameAs(testModel)); }
public void GetModel_ValueSameAs_AddModel() { // Arrange ModelLocator modelLocator = new ModelLocator(); _parentGameObject = new GameObject(); TestModel testModel = _parentGameObject.AddComponent <TestModel>(); // Act modelLocator.AddModel(testModel); TestModel foundTestModel = modelLocator.GetModel <TestModel>(); // Assert Assert.That(foundTestModel, Is.SameAs(testModel)); }
public Context() { _modelLocator = new ModelLocator(); _commandManager = new CommandManager(); }