public void TestRealNull() { const string myFileName = "real_null.bcp"; WriteReal(null, myFileName); BCPTests.CheckFile(myFileName); }
public void TestIntNull() { const string myFileName = "int_null.bcp"; WriteInt(null, myFileName); BCPTests.CheckFile(myFileName); }
public void TestText() { const string myFileName = "text.bcp"; WriteText("KIKOO éùà", myFileName); BCPTests.CheckFile(myFileName); }
public void TestNVarChar50Null() { const string myFileName = "nvarchar(50)_null.bcp"; WriteNVarChar(null, 50, myFileName); BCPTests.CheckFile(myFileName); }
public void TestUniqueIdentifierNull() { const string myFileName = "uniqueidentifier_null.bcp"; WriteUniqueIdentifier(null, myFileName); BCPTests.CheckFile(myFileName); }
public void TestXml() { const string myFileName = "xml.bcp"; WriteXml("<content>KIKOO</content>", myFileName); BCPTests.CheckFile(myFileName); }
public void TestTextNull() { const string myFileName = "text_null.bcp"; WriteText(null, myFileName); BCPTests.CheckFile(myFileName); }
public void TestDateTime2Null() { const string myFileName = "datetime2_null.bcp"; WriteDateTime2(null, myFileName); BCPTests.CheckFile(myFileName); }
public void TestVarCharMaxEmpty() { const string myFileName = "varchar(max)_empty.bcp"; WriteVarChar("", SQLVarChar.MAX, myFileName); BCPTests.CheckFile(myFileName); }
public void TestVarCharMaxNull() { const string myFileName = "varchar(max)_null.bcp"; WriteVarChar(null, SQLVarChar.MAX, myFileName); BCPTests.CheckFile(myFileName); }
public void TestTimeNull() { const string myFileName = "time_null.bcp"; WriteTime(null, myFileName); BCPTests.CheckFile(myFileName); }
public void TestVarCharMax() { const string myFileName = "varchar(max).bcp"; WriteVarChar("KIKOO", SQLVarChar.MAX, myFileName); BCPTests.CheckFile(myFileName); }
public void Test0Columns() { const string myFileName = "0columns.bcp"; BCPWriter writer = new BCPWriter { Mode = BCPWriter.BackendMode.Debug }; List <object> rows = new List <object>(); rows.Add("Frédéric François"); rows.Add("Chopin"); rows.Add(1810); rows.Add(1849); try { BinaryWriter stream = BCPTests.CreateBinaryFile(myFileName); writer.WriteRows(stream, rows); stream.Close(); } catch (ArgumentException) { } }
public void TestTextEmpty() { const string myFileName = "text_empty.bcp"; WriteText("", myFileName); BCPTests.CheckFile(myFileName); }
public void TestNVarChar50() { const string myFileName = "nvarchar(50).bcp"; WriteNVarChar("KIKOO", 50, myFileName); BCPTests.CheckFile(myFileName); }
private static void WriteReal(float?value, string myFileName) { BinaryWriter writer = BCPTests.CreateBinaryFile(myFileName); SQLReal.Write(writer, value); writer.Close(); }
private static void WriteTime(DateTime?time, string myFileName) { BinaryWriter writer = BCPTests.CreateBinaryFile(myFileName); SQLTime.Write(writer, time); writer.Close(); }
public void TestVarBinaryMaxEmpty() { byte[] data = { }; const string myFileName = "varbinary(max)_empty.bcp"; WriteVarBinary(data, SQLVarBinary.MAX, myFileName); BCPTests.CheckFile(myFileName); }
private static void WriteText(string text, string myFileName) { BinaryWriter writer = BCPTests.CreateBinaryFile(myFileName); SQLText.Write(writer, text); writer.Close(); }
private static void WriteInt(int?value, string myFileName) { BinaryWriter writer = BCPTests.CreateBinaryFile(myFileName); SQLInt.Write(writer, value); writer.Close(); }
private static void WriteUniqueIdentifier(Guid?guid, string myFileName) { BinaryWriter writer = BCPTests.CreateBinaryFile(myFileName); SQLUniqueIdentifier.Write(writer, guid); writer.Close(); }
private static void WriteDateTime2(DateTime?dateTime, string myFileName) { BinaryWriter writer = BCPTests.CreateBinaryFile(myFileName); SQLDateTime2.Write(writer, dateTime); writer.Close(); }
public void TestIntMax() { const int value = SQLInt.MAX_VALUE; string myFileName = string.Format("int({0}).bcp", value); WriteInt(value, myFileName); BCPTests.CheckFile(myFileName); }
public void TestInt1000() { const int value = 1000; string myFileName = string.Format("int({0}).bcp", value); WriteInt(value, myFileName); BCPTests.CheckFile(myFileName); }
public void TestNChar4000Null() { const ushort length = 4000; string myFileName = string.Format("nchar({0})_null.bcp", length); WriteNChar(null, length, myFileName); BCPTests.CheckFile(myFileName); }
public void TestNChar1000() { const ushort length = 1000; string myFileName = string.Format("nchar({0}).bcp", length); WriteNChar("KIKOO", length, myFileName); BCPTests.CheckFile(myFileName); }
public void TestBinaryMaxNull() { const ushort length = SQLBinary.MAX_LENGTH; string myFileName = string.Format("binary({0})_null.bcp", length); WriteBinary(null, length, myFileName); BCPTests.CheckFile(myFileName); }
public void TestBigIntMax() { const long value = 9223372036854775807; const string myFileName = "bigint(max).bcp"; WriteBigInt(value, myFileName); BCPTests.CheckFile(myFileName); }
public void TestDateTime2Min() { DateTime dateTime = new DateTime(0001, 01, 01, 00, 00, 00); const string myFileName = "datetime2_min.bcp"; WriteDateTime2(dateTime, myFileName); BCPTests.CheckFile(myFileName); }
public void TestReal() { const float value = 1234.5678f; const string myFileName = "real.bcp"; WriteReal(value, myFileName); BCPTests.CheckFile(myFileName); }