Beispiel #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="TSqlNCharValue" /> 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 TSqlNCharValue(string value, TSqlNCharSize size)
 {
     if (value == null)
         throw new ArgumentNullException("value");
     _value = value;
     _size = size;
 }
Beispiel #2
0
 /// <summary>
 ///     Returns a NCHAR 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 NChar(string value, TSqlNCharSize size)
 {
     if (value == null)
     {
         return(new TSqlNCharNullValue(size));
     }
     return(new TSqlNCharValue(value, size));
 }
Beispiel #3
0
 private static TSqlNCharValue SutFactory(string value, TSqlNCharSize size)
 {
     return(new TSqlNCharValue(value, size));
 }
Beispiel #4
0
 public void SetUp()
 {
     _size = new TSqlNCharSize(100);
     _sut  = new TSqlNCharNullValue(_size);
 }
Beispiel #5
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="TSqlNCharNullValue" /> class.
 /// </summary>
 /// <param name="size">The size.</param>
 public TSqlNCharNullValue(TSqlNCharSize size)
 {
     _size = size;
 }
        public void CanBeImplicitlyConvertedFromInt32()
        {
            TSqlNCharSize sut = 123;

            Assert.That(sut, Is.EqualTo(SutFactory(123)));
        }
 public void SetUp()
 {
     _size = new TSqlNCharSize(100);
     _sut = new TSqlNCharNullValue(_size);
 }
Beispiel #8
0
 /// <summary>
 ///     Returns a NCHAR 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 NChar(string value, TSqlNCharSize size)
 {
     if (value == null)
         return new TSqlNCharNullValue(size);
     return new TSqlNCharValue(value, size);
 }
Beispiel #9
0
 private static TSqlNCharValue SutFactory(string value, TSqlNCharSize size)
 {
     return new TSqlNCharValue(value, size);
 }