CloneSet263


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26230.990class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
126148
src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs
226177
src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs
Clone Instance
1
Line Count
26
Source Line
148
Source File
src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs

                [Test]
                public void SecondLevelCacheWithCriteriaQueries()
                {
                        using (ISession session = OpenSession())
                        {
                                IList list = session.CreateCriteria( typeof(AnotherItem)).
                                         Add (Expression.Gt("Id", 2)).
                                         SetCacheable(true).
                                         List();
                                Assert.AreEqual(3, list.Count);

                                using (IDbCommand cmd = session.Connection.CreateCommand())
                                {
                                        cmd.CommandText = "DELETE FROM AnotherItem";
                                        cmd.ExecuteNonQuery();
                                }
                        }

                        using (ISession session = OpenSession())
                        {
                                //should bring from cache
                                IList list = session.CreateCriteria( typeof(AnotherItem)).
                                         Add (Expression.Gt("Id", 2)).
                                         SetCacheable(true).
                                         List();
                                Assert.AreEqual(3, list.Count);
                        }
                }



Clone Instance
2
Line Count
26
Source Line
177
Source File
src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs

                [Test]
                public void SecondLevelCacheWithCriteriaQueriesForItemWithCollections()
                {
                        using (ISession session = OpenSession())
                        {
                                IList list = session.CreateCriteria( typeof(Item)).
                                         Add (Expression.Gt("Id", 2)).
                                         SetCacheable(true).
                                         List();
                                Assert.AreEqual(3, list.Count);

                                using (IDbCommand cmd = session.Connection.CreateCommand())
                                {
                                        cmd.CommandText = "DELETE FROM Item";
                                        cmd.ExecuteNonQuery();
                                }
                        }

                        using (ISession session = OpenSession())
                        {
                                //should bring from cache
                                IList list = session.CreateCriteria( typeof(Item)).
                                         Add (Expression.Gt("Id", 2)).
                                         SetCacheable(true).
                                         List();
                                Assert.AreEqual(3, list.Count);
                        }
                }



Clone AbstractionParameter Count: 3Parameter Bindings

[Test]
public void [[#variable6e716100]]()
{
   using (ISession session = OpenSession())
   {
      IList list = session.CreateCriteria( typeof( [[#variable2a583140]])).Add(Expression.Gt("Id", 2)).SetCacheable(true).List();
      Assert.AreEqual(3, list.Count);
      using (IDbCommand cmd = session.Connection.CreateCommand())
      {
         cmd.CommandText = [[#variable6e716060]];
         cmd.ExecuteNonQuery();
      }
   }
   using (ISession session = OpenSession())
   {
      //should bring from cache
      IList list = session.CreateCriteria( typeof( [[#variable2a583140]])).Add(Expression.Gt("Id", 2)).SetCacheable(true).List();
      Assert.AreEqual(3, list.Count);
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6e716100]]
SecondLevelCacheWithCriteriaQueries 
12[[#6e716100]]
SecondLevelCacheWithCriteriaQueriesForItemWithCollections 
21[[#2a583140]]
AnotherItem 
22[[#2a583140]]
Item 
31[[#6e716060]]
"DELETE FROM AnotherItem" 
32[[#6e716060]]
"DELETE FROM Item"