示例#1
0
        public void TestInitFromNullAttributeTable()
        {
            TestInspectorType testInspectorType = new TestInspectorType();

            Assert.DoesNotThrow(
                () => InspectorUtils.InitFromAttributeTable(this.testGame.EntityManager, testInspectorType, null));
        }
示例#2
0
        public void TestCreateFromNullAttributeTable()
        {
            TestInspectorType testInspectorType = null;

            Assert.DoesNotThrow(
                () =>
            {
                testInspectorType =
                    InspectorUtils.CreateFromAttributeTable <TestInspectorType>(
                        this.testGame.EntityManager,
                        this.inspectorType,
                        null);
            });

            Assert.NotNull(testInspectorType);
        }
示例#3
0
        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));
 }