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)); }