public void TestInitFromNullAttributeTable() { TestInspectorType testInspectorType = new TestInspectorType(); Assert.DoesNotThrow( () => InspectorUtils.InitFromAttributeTable(this.testGame.EntityManager, testInspectorType, null)); }
public void TestCreateFromNullAttributeTable() { TestInspectorType testInspectorType = null; Assert.DoesNotThrow( () => { testInspectorType = InspectorUtils.CreateFromAttributeTable <TestInspectorType>( this.testGame.EntityManager, this.inspectorType, null); }); Assert.NotNull(testInspectorType); }
public void TestCreateFromAttributeTable() { IAttributeTable attributeTable = new AttributeTable(); const string TestValueString1 = "Test1"; const string TestValueString2 = "Test2"; attributeTable.SetValue(TestInspectorType.AttributeString1, TestValueString1); attributeTable.SetValue(TestInspectorType.AttributeString2, TestValueString2); TestInspectorType testInspectorType = InspectorUtils.CreateFromAttributeTable <TestInspectorType>( this.testGame.EntityManager, this.inspectorType, attributeTable); Assert.AreEqual(testInspectorType.String1, TestValueString1); Assert.AreEqual(testInspectorType.String2, TestValueString2); }
public void TestInitFromNullAttributeTableAndInspectorType() { TestInspectorType testInspectorType = new TestInspectorType(); Assert.DoesNotThrow( () => InspectorUtils.InitFromAttributeTable( this.testGame.EntityManager, this.inspectorType, testInspectorType, null)); }