public void TestReadRawStringIndex() { var fieldSet = new DefaultFieldSet(new[] { " string " }); var read = fieldSet.ReadRawString(0); Assert.AreEqual(" string ", read); }
public void TestReadRawStringName() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { " string " }); var read = fieldSet.ReadRawString("name"); Assert.AreEqual(" string ", read); }
public void TestReadBooleanIndex2() { var fieldSet = new DefaultFieldSet(new[] { "Y" }); var read = fieldSet.ReadBoolean(0, "Y"); Assert.IsTrue(read); }
public void TestExtractFieldSet() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "value" }); var result = _extractor.Extract(fieldSet); Assert.IsNotNull(result); Assert.AreEqual(1, result.Length); Assert.AreEqual("value", result[0]); }
public void TestReadDateName() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "2015-06-03" }); var read = fieldSet.ReadDate("name"); Assert.AreEqual(new DateTime(2015, 6, 3), read); }
public void TestReadDecimalIndexDefaultValue() { var fieldSet = new DefaultFieldSet(new[] { " " }); var read = fieldSet.ReadDecimal(0, 33m); Assert.AreEqual(33m, read); }
public void TestReadDecimalNameDefaultValye() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { " " }); var read = fieldSet.ReadDecimal("name", 33m); Assert.AreEqual(33m, read); }
public void TestReadShortName() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "32767" }); var read = fieldSet.ReadShort("name"); Assert.AreEqual(32767, read); }
public void TestReadDecimalName() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "1999.37" }); var read = fieldSet.ReadDecimal("name"); Assert.AreEqual(1999.37m, read); }
public void TestReadDateNamePatternDefaultValue() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { " " }); var read = fieldSet.ReadDate("name", "dd/MM/yyyy", new DateTime(1970, 1, 1)); Assert.AreEqual(new DateTime(1970, 1, 1), read); }
public void TestReadByteIndex() { var fieldSet = new DefaultFieldSet(new[] { "255" }); var read = fieldSet.ReadByte(0); Assert.AreEqual(255, read); }
public void TestReadLongIndexDefaultValue() { var fieldSet = new DefaultFieldSet(new[] { " " }); var read = fieldSet.ReadLong(0, 2); Assert.AreEqual(2, read); }
public void TestReadLongNameDefaultValue() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { " " }); var read = fieldSet.ReadLong("name", 2); Assert.AreEqual(2, read); }
public void TestReadIntNameDefaultValue() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { " " }); var read = fieldSet.ReadInt("name", 3); Assert.AreEqual(3, read); }
public void TestReadLongName() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "9223372036854775807" }); var read = fieldSet.ReadLong("name"); Assert.AreEqual(9223372036854775807, read); }
public void TestReadIntIndexDefaultValue() { var fieldSet = new DefaultFieldSet(new[] { " " }); var read = fieldSet.ReadInt(0, 3); Assert.AreEqual(3, read); }
public void TestReadIntName() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "2147483647" }); var read = fieldSet.ReadInt("name"); Assert.AreEqual(2147483647, read); }
public void TestReadIntIndex() { var fieldSet = new DefaultFieldSet(new[] { "2147483647" }); var read = fieldSet.ReadInt(0); Assert.AreEqual(2147483647, read); }
public void TestReadDateIndexDefaultValue() { var fieldSet = new DefaultFieldSet(new[] { " " }); var read = fieldSet.ReadDate(0, new DateTime(1970, 1, 1)); Assert.AreEqual(new DateTime(1970, 1, 1), read); }
public void TestReadBooleanName2() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "Y" }); var read = fieldSet.ReadBoolean("name", "Y"); Assert.IsTrue(read); }
public void TestReadDateNamePattern() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "04/06/2015" }); var read = fieldSet.ReadDate("name", "dd/MM/yyyy"); Assert.AreEqual(new DateTime(2015, 6, 4), read); }
public void TestReadBooleanName() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "c" }); var read = fieldSet.ReadChar("name"); Assert.AreEqual('c', read); }
public void TestReadByteName() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "255" }); var read = fieldSet.ReadByte("name"); Assert.AreEqual(255, read); }
public void TestReadDecimalIndex() { var fieldSet = new DefaultFieldSet(new[] { "1999.37" }); var read = fieldSet.ReadDecimal(0); Assert.AreEqual(1999.37m, read); }
public void TestReadDoubleIndex() { var fieldSet = new DefaultFieldSet(new[] { "2.37" }); var read = fieldSet.ReadDouble(0); Assert.AreEqual(2.37D, read); }
public void TestReadShortIndex() { var fieldSet = new DefaultFieldSet(new[] { "32767" }); var read = fieldSet.ReadShort(0); Assert.AreEqual(32767, read); }
public void TestReadDoubleName() { var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "2.37" }); var read = fieldSet.ReadDouble("name"); Assert.AreEqual(2.37D, read); }
public void TestReadBooleanIndex() { var fieldSet = new DefaultFieldSet(new[] { "c" }); var read = fieldSet.ReadChar(0); Assert.AreEqual('c', read); }