public void CanSerializeNullString()
 {
     DbAssert.IsTrue("SELECT CAST(IIF(@parameter IS NULL, 1, 0) AS BIT)", new { parameter = (string)null });
 }
 public void CanSerializeEmptyByteArray()
 {
     DbAssert.IsTrue("SELECT CAST(IIF(CAST(@parameter AS VARCHAR) = '', 1, 0) AS BIT)", new { parameter = new byte[] { } });
 }
 public void CanSerializeEmptyString()
 {
     DbAssert.IsTrue("SELECT CAST(IIF(@parameter = '', 1, 0) AS BIT)", new { parameter = "" });
 }
 public void CanSerializeTwoCharacterString()
 {
     DbAssert.IsTrue("SELECT CAST(IIF(@parameter = 'B', 1, 0) AS BIT)", new { parameter = "B" });
 }
 public virtual void CanSerializeNullableNullValue()
 {
     DbAssert.IsTrue("SELECT CAST(IIF(@parameter IS NULL, 1, 0) AS BIT)", new { parameter = (TParameter?)null });
 }
 public void CanSerializeNullableSqlServerMinValue()
 {
     DbAssert.IsTrue(string.Format(CultureInfo.InvariantCulture, "SELECT CAST(IIF(@parameter = CAST('{0:yyyy-MM-dd HH:mm:ss.fff}' AS DATETIME), 1, 0) AS BIT)", (DateTime?)SqlDateTime.MinValue.Value), new { parameter = (DateTime?)SqlDateTime.MinValue.Value });
 }
 public virtual void CanSerializeDefaultValue()
 {
     DbAssert.IsTrue(string.Format(CultureInfo.InvariantCulture, queryFormat, default(TParameter)), new { parameter = default(TParameter) });
 }
Пример #8
0
 public void CanSerializePublicClassProtectedGetter()
 {
     DbAssert.IsTrue("SELECT CAST(@ProtectedGetter AS BIT)", new PublicClass(protectedGetter: true));
 }
Пример #9
0
 public void CanSerializeTwoElementCharArray()
 {
     DbAssert.IsTrue("SELECT CAST(IIF(@parameter = 'AB', 1, 0) AS BIT)", new { parameter = new[] { 'A', 'B' } });
 }
Пример #10
0
 public virtual void CanSerializeMaxValue()
 {
     DbAssert.IsTrue(string.Format(CultureInfo.InvariantCulture, queryFormat, max), new { parameter = max });
 }
Пример #11
0
 public void CanSerializeEmptyCharArray()
 {
     DbAssert.IsTrue("SELECT CAST(IIF(@parameter = '', 1, 0) AS BIT)", new { parameter = new char[] { } });
 }
Пример #12
0
 public void CannotSerializePublicStructPublicGetter()
 {
     DbAssert.IsTrue("SELECT CAST(@PublicGetter AS BIT)", new PublicStruct(publicGetter: true));
 }
Пример #13
0
 public void CanSerializePublicClassInternalGetter()
 {
     DbAssert.IsTrue("SELECT CAST(@InternalGetter AS BIT)", new PublicClass(internalGetter: true));
 }
 public void CanSerializeTwoElementByteArray()
 {
     DbAssert.IsTrue("SELECT CAST(IIF(CAST(@parameter AS VARCHAR) = 'AB', 1, 0) AS BIT)", new { parameter = new[] { (byte)'A', (byte)'B' } });
 }
Пример #15
0
 public virtual void CanSerializeNullableMinValue()
 {
     DbAssert.IsTrue(string.Format(CultureInfo.InvariantCulture, queryFormat, (TParameter?)min), new { parameter = (TParameter?)min });
 }
 public void CanSerializeNullByteArray()
 {
     DbAssert.IsTrue("SELECT CAST(IIF(@parameter IS NULL, 1, 0) AS BIT)", new { parameter = (byte[])null });
 }
Пример #17
0
 public void DoesNotSerializePublicClassPrivateGetterNoAutoProperty()
 {
     DbAssert.IsTrue("SELECT CAST(@PrivateGetterNoAutoProperty AS BIT)", new PublicClass(privateGetterNoAutoProperty: true));
 }