예제 #1
0
        public void GetTableSchemaTest()
        {
            var obj = new ExportTestObject();
            var target = new TableFormatHelper(obj);
            var expected = new ColunmPropertyPair[]{
                new ColunmPropertyPair{ PropertyName="OrderValue", ColunmName = "OrderValue", Order=1},
                new ColunmPropertyPair{ PropertyName="DefaultValue", ColunmName = "DefaultValue", Order=int.MaxValue},
                new ColunmPropertyPair{ PropertyName="NameValue", ColunmName = "MyName", Order=int.MaxValue}

            };
            IEnumerable<ColunmPropertyPair> actual = target.GetTableSchema();

            int count = 0;
            foreach (var p in actual)
            {
                Assert.AreEqual(expected[count++], p);
            }
        }
예제 #2
0
 public void TableFormatHelperConstructorTest1()
 {
     var obj = new object();
     var target = new TableFormatHelper(obj);
     Assert.AreEqual(obj.GetType(), target.ExportType);
 }
예제 #3
0
 public void TableFormatHelperConstructorTest()
 {
     var type = typeof(Object);
     var target = new TableFormatHelper(type);
     Assert.AreEqual(type, target.ExportType);
 }