2 * Firebird ADO.NET Data provider for .NET and Mono
4 * The contents of this file are subject to the Initial
5 * Developer's Public License Version 1.0 (the "License");
6 * you may not use this file except in compliance with the
7 * License. You may obtain a copy of the License at
8 * http://www.firebirdsql.org/index.php?op=doc&id=idpl
10 * Software distributed under the License is distributed on
11 * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
12 * express or implied. See the License for the specific
13 * language governing rights and limitations under the License.
15 * Copyright (c) 2002, 2004 Carlos Guzman Alvarez
16 * All Rights Reserved.
21 using System.Data.Common;
23 using NUnit.Framework;
24 using FirebirdSql.Data.Firebird;
26 namespace FirebirdSql.Data.Firebird.Tests
29 public class FbParameterTest : BaseTest
31 public FbParameterTest() : base()
36 public void ConstructorsTest()
38 FbParameter ctor01 = new FbParameter();
39 FbParameter ctor02 = new FbParameter("ctor2", 10);
40 FbParameter ctor03 = new FbParameter("ctor3", FbDbType.Char);
41 FbParameter ctor04 = new FbParameter("ctor4", FbDbType.Integer, 4);
42 FbParameter ctor05 = new FbParameter("ctor5", FbDbType.Integer, 4, "int_field");
43 FbParameter ctor06 = new FbParameter(
47 ParameterDirection.Input,
52 DataRowVersion.Original,
64 public void CloneTest()
66 FbParameter p = new FbParameter("@p1", FbDbType.Integer);
68 p.Charset = FbCharset.Dos850;
70 FbParameter p1 = ((ICloneable)p).Clone() as FbParameter;
72 Assert.AreEqual(p1.ParameterName, p.ParameterName);
73 Assert.AreEqual(p1.FbDbType , p.FbDbType);
74 Assert.AreEqual(p1.DbType , p.DbType);
75 Assert.AreEqual(p1.Direction , p.Direction);
76 Assert.AreEqual(p1.SourceColumn , p.SourceColumn);
77 Assert.AreEqual(p1.SourceVersion, p.SourceVersion);
78 Assert.AreEqual(p1.Charset , p.Charset);
79 Assert.AreEqual(p1.IsNullable , p.IsNullable);
80 Assert.AreEqual(p1.Size , p.Size);
81 Assert.AreEqual(p1.Scale , p.Scale);
82 Assert.AreEqual(p1.Precision , p.Precision);
83 Assert.AreEqual(p1.Value , p.Value);