Exemple #1
0
        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);
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        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));
        }
Exemple #4
0
 public Context()
 {
     _modelLocator   = new ModelLocator();
     _commandManager = new CommandManager();
 }