CloneSet843


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
15230.984class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11562
src/NHibernate.Test/QueryTest/PositionalParametersFixture.cs
21580
src/NHibernate.Test/QueryTest/PositionalParametersFixture.cs
Clone Instance
1
Line Count
15
Source Line
62
Source File
src/NHibernate.Test/QueryTest/PositionalParametersFixture.cs

                [Test]
                public void TestPositionOutOfBounds()
                {
                        ISession s = OpenSession();
                        ITransaction t = s.BeginTransaction();
                        try
                        {
                                IQuery q = s.CreateQuery("from s in class Simple where s.Name=? and s.Count=?");
                                // Try to set the third positional parameter
                                Assert.Throws<ArgumentException> (() => q.SetParameter(3, "Fred"));
                        }
                        finally
                        {
                                t.Rollback();
                                s.Close();
                        }
                }



Clone Instance
2
Line Count
15
Source Line
80
Source File
src/NHibernate.Test/QueryTest/PositionalParametersFixture.cs

                [Test]
                public void TestNoPositionalParameters()
                {
                        ISession s = OpenSession();
                        ITransaction t = s.BeginTransaction();
                        try
                        {
                                IQuery q = s.CreateQuery("from s in class Simple where s.Name=:Name and s.Count=:Count");
                                // Try to set the first property
                                Assert.Throws<ArgumentException> (() => q.SetParameter(0, "Fred"));
                        }
                        finally
                        {
                                t.Rollback();
                                s.Close();
                        }
                }



Clone AbstractionParameter Count: 3Parameter Bindings

[Test]
public void [[#variable6de518c0]]()
{
   ISession s = OpenSession();
   ITransaction t = s.BeginTransaction();
   try
   {
      IQuery q = s.CreateQuery( [[#variable70bd9bc0]]);
      // Try to set the third positional parameter
      // Try to set the first property
      Assert.Throws<ArgumentException> (() => q.SetParameter( [[#variable70e403c0]], "Fred"));
   }
   finally
   {
      t.Rollback();
      s.Close();
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6de518c0]]
TestPositionOutOfBounds 
12[[#6de518c0]]
TestNoPositionalParameters 
21[[#70bd9bc0]]
"from s in class Simple where s.Name=? and s.Count=?" 
22[[#70bd9bc0]]
"from s in class Simple where s.Name=:Name and s.Count=:Count" 
31[[#70e403c0]]
3 
32[[#70e403c0]]
0