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) }); }
public void CanSerializePublicClassProtectedGetter() { DbAssert.IsTrue("SELECT CAST(@ProtectedGetter AS BIT)", new PublicClass(protectedGetter: true)); }
public void CanSerializeTwoElementCharArray() { DbAssert.IsTrue("SELECT CAST(IIF(@parameter = 'AB', 1, 0) AS BIT)", new { parameter = new[] { 'A', 'B' } }); }
public virtual void CanSerializeMaxValue() { DbAssert.IsTrue(string.Format(CultureInfo.InvariantCulture, queryFormat, max), new { parameter = max }); }
public void CanSerializeEmptyCharArray() { DbAssert.IsTrue("SELECT CAST(IIF(@parameter = '', 1, 0) AS BIT)", new { parameter = new char[] { } }); }
public void CannotSerializePublicStructPublicGetter() { DbAssert.IsTrue("SELECT CAST(@PublicGetter AS BIT)", new PublicStruct(publicGetter: true)); }
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' } }); }
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 }); }
public void DoesNotSerializePublicClassPrivateGetterNoAutoProperty() { DbAssert.IsTrue("SELECT CAST(@PrivateGetterNoAutoProperty AS BIT)", new PublicClass(privateGetterNoAutoProperty: true)); }