コード例 #1
0
 public void GetDataTypeNameTestAsync()
 {
     using (var test = new DataTableWrapper(m_DataTable))
     {
         Assert.AreEqual(DataType.Integer.GetNetType().Name, test.GetDataTypeName(0));
         Assert.AreEqual(nameof(String), test.GetDataTypeName(1));
         Assert.AreEqual(nameof(DateTime), test.GetDataTypeName(4));
         try
         {
             Assert.AreEqual(nameof(DateTime), test.GetDataTypeName(5));
             Assert.Fail("Expected exception");
         }
         catch (Exception)
         {
             //fine
         }
     }
 }
コード例 #2
0
 public void GetDataTypeNameTest()
 {
     using (var processDisplay = new CustomProcessDisplay(UnitTestInitializeCsv.Token))
     {
         using (var test = new DataTableWrapper(m_DataTable))
         {
             // await test.OpenAsync(processDisplay.CancellationToken);
             var typeName = test.GetDataTypeName(0);
             Assert.IsTrue(typeName.Equals("int") || typeName.Equals("Int32") || typeName.Equals("Int64") ||
                           typeName.Equals("long"));
         }
     }
 }