Exemplo n.º 1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="TSqlCharValue" /> 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 TSqlCharValue(string value, TSqlCharSize size)
 {
     if (value == null)
         throw new ArgumentNullException("value");
     _value = value;
     _size = size;
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Returns a CHAR 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 Char(string value, TSqlCharSize size)
 {
     if (value == null)
     {
         return(new TSqlCharNullValue(size));
     }
     return(new TSqlCharValue(value, size));
 }
Exemplo n.º 3
0
 private static TSqlCharValue SutFactory(string value, TSqlCharSize size)
 {
     return(new TSqlCharValue(value, size));
 }
 public void SetUp()
 {
     _size = new TSqlCharSize(100);
     _sut  = new TSqlCharNullValue(_size);
 }
Exemplo n.º 5
0
        public void CanBeImplicitlyConvertedFromInt32()
        {
            TSqlCharSize sut = 123;

            Assert.That(sut, Is.EqualTo(SutFactory(123)));
        }
Exemplo n.º 6
0
 /// <summary>
 ///     Returns a CHAR 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 Char(string value, TSqlCharSize size)
 {
     if (value == null)
         return new TSqlCharNullValue(size);
     return new TSqlCharValue(value, size);
 }
Exemplo n.º 7
0
 private static TSqlCharValue SutFactory(string value, TSqlCharSize size)
 {
     return new TSqlCharValue(value, size);
 }
Exemplo n.º 8
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="TSqlCharNullValue" /> class.
 /// </summary>
 /// <param name="size">The size.</param>
 public TSqlCharNullValue(TSqlCharSize size)
 {
     _size = size;
 }