CloneSet420


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
30240.987class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
130388
src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs
230420
src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs
Clone Instance
1
Line Count
30
Source Line
388
Source File
src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs

                [Test]
                public void CanNotRetrieveCriteriaResultWithUnknownKey()
                {
                        CreateItems();

                        using (ISession session = OpenSession())
                        {
                                IMultiCriteria multiCriteria = session.CreateMultiCriteria();

                                ICriteria firstCriteria = session.CreateCriteria( typeof(Item)).
                                         Add              (Expression.Lt("id", 50));

                                multiCriteria.Add("firstCriteria", firstCriteria);

                                try
                                {
                                        IList firstResult = (IList)multiCriteria.GetResult("unknownKey");
                                        Assert.Fail("This should've thrown an InvalidOperationException");
                                }
                                catch (InvalidOperationException)
                                {
                                }
                                catch (Exception)
                                {
                                        Assert.Fail("This should've thrown an InvalidOperationException");
                                }
                        }


                        RemoveAllItems();
                }



Clone Instance
2
Line Count
30
Source Line
420
Source File
src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs

                [Test]
                public void CanNotRetrieveDetachedCriteriaResultWithUnknownKey()
                {
                        CreateItems();

                        using (ISession session = OpenSession())
                        {
                                IMultiCriteria multiCriteria = session.CreateMultiCriteria();

                                DetachedCriteria firstCriteria = DetachedCriteria.For( typeof(Item)).
                                         Add                     (Expression.Lt("id", 50));

                                multiCriteria.Add("firstCriteria", firstCriteria);

                                try
                                {
                                        IList firstResult = (IList)multiCriteria.GetResult("unknownKey");
                                        Assert.Fail("This should've thrown an InvalidOperationException");
                                }
                                catch (InvalidOperationException)
                                {
                                }
                                catch (Exception)
                                {
                                        Assert.Fail("This should've thrown an InvalidOperationException");
                                }
                        }


                        RemoveAllItems();
                }



Clone AbstractionParameter Count: 4Parameter Bindings

[Test]
public void [[#variable5544fe60]]()
{
   CreateItems();
   using (ISession session = OpenSession())
   {
      IMultiCriteria multiCriteria = session.CreateMultiCriteria();
       [[#variable68479ca0]]firstCriteria = [[#variable68479bc0]]. [[#variable68479b80]]( typeof(Item)).Add(Expression.Lt("id", 50));
      multiCriteria.Add("firstCriteria", firstCriteria);
      try
      {
         IList firstResult = (IList)multiCriteria.GetResult("unknownKey");
         Assert.Fail("This should've thrown an InvalidOperationException");
      }
      catch (InvalidOperationException)
      {
      }
      catch (Exception)
      {
         Assert.Fail("This should've thrown an InvalidOperationException");
      }
   }
   RemoveAllItems();
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5544fe60]]
CanNotRetrieveCriteriaResultWithUnknownKey 
12[[#5544fe60]]
CanNotRetrieveDetachedCriteriaResultWithUnknownKey 
21[[#68479ca0]]
ICriteria 
22[[#68479ca0]]
DetachedCriteria 
31[[#68479bc0]]
session 
32[[#68479bc0]]
DetachedCriteria 
41[[#68479b80]]
CreateCriteria 
42[[#68479b80]]
For