Exemple #1
0
        public void EntityRenameCorrectly()
        {
            // Arrange
            BIWEntity testEntity     = new BIWEntity();
            string    testText       = "Test text";
            BIWEntity returnedEntity = null;
            string    returnedText   = "";

            inspectorController.OnEntityRename += (entity, name) =>
            {
                returnedEntity = entity;
                returnedText   = name;
            };

            // Act
            inspectorController.EntityRename(testEntity, testText);

            // Assert
            Assert.AreEqual(testEntity, returnedEntity, "The entity does not match!");
            Assert.AreEqual(testText, returnedText, "The text does not match!");
        }
        public void EntityRenameCorrectly()
        {
            // Arrange
            DCLBuilderInWorldEntity testEntity = new GameObject("_DCLBuilderInWorldEntity").AddComponent <DCLBuilderInWorldEntity>();
            string testText = "Test text";
            DCLBuilderInWorldEntity returnedEntity = null;
            string returnedText = "";

            inspectorController.OnEntityRename += (entity, name) =>
            {
                returnedEntity = entity;
                returnedText   = name;
            };

            // Act
            inspectorController.EntityRename(testEntity, testText);

            // Assert
            Assert.AreEqual(testEntity, returnedEntity, "The entity does not match!");
            Assert.AreEqual(testText, returnedText, "The text does not match!");
        }