public void GetRowNumberTest() { var rn = CoreFn.GetRowNumber("key"); Assert.IsTrue(rn == 1); rn = CoreFn.GetRowNumber("key"); Assert.IsTrue(rn == 2); }
public void CompareFalseValsTest() { Assert.IsFalse(CoreFn.CompareVals("5", "<", "4", "int")); Assert.IsFalse(CoreFn.CompareVals("5", "<", "4", "uint")); Assert.IsFalse(CoreFn.CompareVals("5", "<", "4", "float")); Assert.IsFalse(CoreFn.CompareVals("5", "<", "4", "double")); Assert.IsFalse(CoreFn.CompareVals("5", "<", "4", "decimal")); Assert.IsFalse(CoreFn.CompareVals("5", "<", "4", "short")); Assert.IsFalse(CoreFn.CompareVals("5", "<", "4", "ushort")); Assert.IsFalse(CoreFn.CompareVals("5", "<", "4", "long")); Assert.IsFalse(CoreFn.CompareVals("5", "<", "4", "ulong")); Assert.IsFalse(CoreFn.CompareVals("5", "<", "4", "byte")); Assert.IsFalse(CoreFn.CompareVals("5", "<", "4", "sbyte")); }
public void IsNonNegativeIntTest() { Assert.IsTrue(CoreFn.IsNonNegativeInt("0")); Assert.IsTrue(CoreFn.IsNonNegativeInt("1")); }
public void IsDecimalTest() { Assert.IsTrue(CoreFn.IsDecimal(decimal.MaxValue.ToString())); Assert.IsTrue(CoreFn.IsDecimal("3.14159")); }
public void IsNonPositiveIntTest() { Assert.IsTrue(CoreFn.IsNonPositiveInt("0")); Assert.IsTrue(CoreFn.IsNonPositiveInt("-1")); }
public void IsCharTest() { Assert.IsTrue(CoreFn.IsChar("A")); }
public void IsLongTest() { Assert.IsTrue(CoreFn.IsLong("9,223,372,036,854,775,807")); }
public void IsBoolTest() { Assert.IsTrue(CoreFn.IsBool("true")); Assert.IsTrue(CoreFn.IsBool("0")); }
public void IsUriTest() { Assert.IsTrue(CoreFn.IsUri("http://www.cint.io", "http")); Assert.IsTrue(CoreFn.IsUri("file://myfile.txt", "file")); }
public void IsNotDotNetTimespanTest() { Assert.IsFalse(CoreFn.IsDotNetTimespan("P1Y2MT2H")); }
public void DateCompareTest() { Assert.IsTrue(CoreFn.DateCompare("20170801", "yyyymmdd", ">", "20110101")); }
public void IsNotISO8601TimespanTest() { Assert.IsFalse(CoreFn.IsISO8601Timespan("02:14:18")); }
public void IsDotNetTimespanTest() { Assert.IsTrue(CoreFn.IsDotNetTimespan("02:14:18")); }
public void DateIsValidTest() { Assert.IsTrue(CoreFn.DateIsValid("20170821", @"yyyymmdd|dd/mm/yyyy")); }
public void IsISO8601TimespanTest() { Assert.IsTrue(CoreFn.IsISO8601Timespan("P1Y2MT2H")); }
public void IsNotCharTest() { Assert.IsFalse(CoreFn.IsChar("Alphabet")); }
public void IsPositiveIntTest() { Assert.IsTrue(CoreFn.IsPositiveInt(int.MaxValue.ToString())); }
public void DateCompareFalseTest() { Assert.IsFalse(CoreFn.DateCompare("20170801", "yyyymmdd", "<", "20110101")); }
public void IsNegativeIntTest() { Assert.IsTrue(CoreFn.IsNegativeInt(int.MinValue.ToString())); }
public void IsIntTest() { Assert.IsTrue(CoreFn.IsInt("12345")); Assert.IsTrue(CoreFn.IsInt("2,147,483,647")); }
public void IsNotBoolTest() { Assert.IsFalse(CoreFn.IsBool("y")); Assert.IsFalse(CoreFn.IsBool("100")); }
public void IsUintTest() { Assert.IsTrue(CoreFn.IsUint("4,294,967,295")); }
public void IsNotUriTest() { Assert.IsFalse(CoreFn.IsUri("http://www.cint.io", "mailto|uuid")); }
public void IsNotDecimalTest() { Assert.IsFalse(CoreFn.IsDecimal("X")); }
public void IsNotIntTest() { Assert.IsFalse(CoreFn.IsInt("12345.678")); }
public void DateIsNotValidTest() { Assert.IsFalse(CoreFn.DateIsValid("2017/08/21", @"yyyymmdd|dd/mm/yyyy")); }
public void IsNotUintTest() { Assert.IsFalse(CoreFn.IsUint("4,294,967,296")); Assert.IsFalse(CoreFn.IsUint("-4")); }
public void GetGuidTest() { var guid = CoreFn.GetGuid(); Assert.IsTrue(CoreFn.IsGuid(guid.ToString())); }
public void IsNotLongTest() { Assert.IsFalse(CoreFn.IsLong("9,223,372,036,854,775,808")); Assert.IsFalse(CoreFn.IsLong("10.56")); }
public void IsNotDoubleTest() { Assert.IsFalse(CoreFn.IsDouble("1.7E309")); Assert.IsFalse(CoreFn.IsDouble("X")); }