Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
24 | 2 | 4 | 0.982 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 24 | 278 | src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs |
2 | 24 | 304 | src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs |
| ||||
[Test] public void CanAddCriteriaWithKeyAndRetrieveResultsWithKey() { CreateItems(); using (ISession session = OpenSession()) { IMultiCriteria multiCriteria = session.CreateMultiCriteria(); ICriteria firstCriteria = session.CreateCriteria( typeof(Item)). Add (Expression.Lt("id", 50)); ICriteria secondCriteria = session.CreateCriteria( typeof(Item)); multiCriteria.Add("firstCriteria", firstCriteria); multiCriteria.Add("secondCriteria", secondCriteria); IList secondResult = (IList)multiCriteria.GetResult("secondCriteria"); IList firstResult = (IList)multiCriteria.GetResult("firstCriteria"); Assert.Greater(secondResult.Count, firstResult.Count); } RemoveAllItems(); } |
| ||||
[Test] public void CanAddDetachedCriteriaWithKeyAndRetrieveResultsWithKey() { CreateItems(); using (ISession session = OpenSession()) { IMultiCriteria multiCriteria = session.CreateMultiCriteria(); DetachedCriteria firstCriteria = DetachedCriteria.For( typeof(Item)). Add (Expression.Lt("id", 50)); DetachedCriteria secondCriteria = DetachedCriteria.For( typeof(Item)); multiCriteria.Add("firstCriteria", firstCriteria); multiCriteria.Add("secondCriteria", secondCriteria); IList secondResult = (IList)multiCriteria.GetResult("secondCriteria"); IList firstResult = (IList)multiCriteria.GetResult("firstCriteria"); Assert.Greater(secondResult.Count, firstResult.Count); } RemoveAllItems(); } |
| |||
[Test] public void [[#variable6f48df80]]() { CreateItems(); using (ISession session = OpenSession()) { IMultiCriteria multiCriteria = session.CreateMultiCriteria(); [[#variable6f48df00]]firstCriteria = [[#variable6f48daa0]]. [[#variable6f48df40]]( typeof(Item)).Add(Expression.Lt("id", 50)); [[#variable6f48df00]]secondCriteria = [[#variable6f48daa0]]. [[#variable6f48df40]]( typeof(Item)); multiCriteria.Add("firstCriteria", firstCriteria); multiCriteria.Add("secondCriteria", secondCriteria); IList secondResult = (IList)multiCriteria.GetResult("secondCriteria"); IList firstResult = (IList)multiCriteria.GetResult("firstCriteria"); Assert.Greater(secondResult.Count, firstResult.Count); } RemoveAllItems(); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6f48df80]] | CanAddCriteriaWithKeyAndRetrieveResultsWithKey |
1 | 2 | [[#6f48df80]] | CanAddDetachedCriteriaWithKeyAndRetrieveResultsWithKey |
2 | 1 | [[#6f48df00]] | ICriteria |
2 | 2 | [[#6f48df00]] | DetachedCriteria |
3 | 1 | [[#6f48daa0]] | session |
3 | 2 | [[#6f48daa0]] | DetachedCriteria |
4 | 1 | [[#6f48df40]] | CreateCriteria |
4 | 2 | [[#6f48df40]] | For |