예제 #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="TSqlNVarCharValue" /> class.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <param name="size">The parameter size.</param>
 /// <exception cref="System.ArgumentNullException">Thrown when the <paramref name="value" /> is <c>null</c>.</exception>
 public TSqlNVarCharValue(string value, TSqlNVarCharSize size)
 {
     if (value == null)
         throw new ArgumentNullException("value");
     _value = value;
     _size = size;
 }
예제 #2
0
 /// <summary>
 ///     Returns a NVARCHAR parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <param name="size">The parameter size.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public static IDbParameterValue NVarChar(string value, TSqlNVarCharSize size)
 {
     if (value == null)
     {
         return(new TSqlNVarCharNullValue(size));
     }
     return(new TSqlNVarCharValue(value, size));
 }
예제 #3
0
 private static TSqlNVarCharValue SutFactory(string value, TSqlNVarCharSize size)
 {
     return(new TSqlNVarCharValue(value, size));
 }
예제 #4
0
        public void CanBeImplicitlyConvertedFromInt32()
        {
            TSqlNVarCharSize sut = 123;

            Assert.That(sut, Is.EqualTo(SutFactory(123)));
        }
예제 #5
0
 public void SetUp()
 {
     _size = new TSqlNVarCharSize(100);
     _sut  = new TSqlNVarCharNullValue(_size);
 }
예제 #6
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="TSqlNVarCharNullValue" /> class.
 /// </summary>
 /// <param name="size">The size.</param>
 public TSqlNVarCharNullValue(TSqlNVarCharSize size)
 {
     _size = size;
 }
예제 #7
0
 /// <summary>
 ///     Returns a NVARCHAR parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <param name="size">The parameter size.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public static IDbParameterValue NVarChar(string value, TSqlNVarCharSize size)
 {
     if (value == null)
         return new TSqlNVarCharNullValue(size);
     return new TSqlNVarCharValue(value, size);
 }
예제 #8
0
 public void SetUp()
 {
     _size = new TSqlNVarCharSize(100);
     _sut = new TSqlNVarCharNullValue(_size);
 }
예제 #9
0
 private static TSqlNVarCharValue SutFactory(string value, TSqlNVarCharSize size)
 {
     return new TSqlNVarCharValue(value, size);
 }