Esempio n. 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;
 }
Esempio n. 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));
 }
Esempio n. 3
0
 private static TSqlNCharValue SutFactory(string value, TSqlNCharSize size)
 {
     return(new TSqlNCharValue(value, size));
 }
Esempio n. 4
0
 public void SetUp()
 {
     _size = new TSqlNCharSize(100);
     _sut  = new TSqlNCharNullValue(_size);
 }
Esempio n. 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;
 }
Esempio n. 6
0
        public void CanBeImplicitlyConvertedFromInt32()
        {
            TSqlNCharSize sut = 123;

            Assert.That(sut, Is.EqualTo(SutFactory(123)));
        }
Esempio n. 7
0
 public void SetUp()
 {
     _size = new TSqlNCharSize(100);
     _sut = new TSqlNCharNullValue(_size);
 }
Esempio n. 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);
 }
Esempio n. 9
0
 private static TSqlNCharValue SutFactory(string value, TSqlNCharSize size)
 {
     return new TSqlNCharValue(value, size);
 }