CloneSet252


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
6310.993statement_list[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11245
src/NHibernate.Test/NHSpecificTest/NH1789/ProxyEqualityProblemTest.cs
21277
src/NHibernate.Test/NHSpecificTest/NH1789/ProxyEqualityProblemTest.cs
36105
src/NHibernate.Test/NHSpecificTest/NH1789/ProxyEqualityProblemTest.cs
Clone Instance
1
Line Count
12
Source Line
45
Source File
src/NHibernate.Test/NHSpecificTest/NH1789/ProxyEqualityProblemTest.cs

                                //We load a proxy version of Maurice
                                var mauriceProxy = session.Load < ICat > ((long) 2);

                                Assert.IsTrue(mauriceProxy is INHibernateProxy, "The proxy should be of type INHibernateProxy");

                                //From it's proxy, we get a non-proxied (concrete?) version
                                var mauriceNonProxy = DomainObject.UnProxy < ICat > (mauriceProxy);

                                Assert.IsTrue( !(mauriceNonProxy is INHibernateProxy), "The non-proxy shouldn't be of type INHibernateProxy");

                                //We check if the name and ID matches (as they should be because they are the same entity!)
                                Assert.AreEqual(mauriceProxy.Name, mauriceNonProxy.Name, "The two objects should have the same name");
                                Assert.AreEqual(mauriceProxy.ID, mauriceNonProxy.ID, "The two objects should have the same ID");


Clone Instance
2
Line Count
12
Source Line
77
Source File
src/NHibernate.Test/NHSpecificTest/NH1789/ProxyEqualityProblemTest.cs

                                //We load a proxy version of Maurice
                                var mauriceProxy = session.Load < Cat > ((long) 2);

                                Assert.IsTrue(mauriceProxy is INHibernateProxy, "The proxy should be of type INHibernateProxy");

                                //From it's proxy, we get a non-proxied (concrete?) version
                                var mauriceNonProxy = DomainObject.UnProxy < Cat > (mauriceProxy);

                                Assert.IsTrue( !(mauriceNonProxy is INHibernateProxy), "The non-proxy shouldn't be of type INHibernateProxy");

                                //We check if the name and ID matches (as they should be because they are the same entity!)
                                Assert.AreEqual(mauriceProxy.Name, mauriceNonProxy.Name, "The two objects should have the same name");
                                Assert.AreEqual(mauriceProxy.ID, mauriceNonProxy.ID, "The two objects should have the same ID");


Clone Instance
3
Line Count
6
Source Line
105
Source File
src/NHibernate.Test/NHSpecificTest/NH1789/ProxyEqualityProblemTest.cs

                                //As before, we load a proxy, a non-proxy of the same entity, and checks everything is correct:
                                var mauriceProxy = session.Load < ICat > ((long) 2);
                                Assert.IsTrue(mauriceProxy is INHibernateProxy, "The proxy should be of type INHibernateProxy");
                                var mauriceNonProxy = DomainObject.UnProxy < ICat > (mauriceProxy);
                                Assert.IsTrue( !(mauriceNonProxy is INHibernateProxy), "The non-proxy shouldn't be of type INHibernateProxy");
                                Assert.AreEqual(mauriceProxy.Name, mauriceNonProxy.Name, "The two objects should have the same name");
                                Assert.AreEqual(mauriceProxy.ID, mauriceNonProxy.ID, "The two objects should have the same ID");


Clone AbstractionParameter Count: 1Parameter Bindings

//As before, we load a proxy, a non-proxy of the same entity, and checks everything is correct:
//We load a proxy version of Maurice
var mauriceProxy = session.Load < [[#variable5eb60c00]]> ((long)2);
Assert.IsTrue(mauriceProxy is INHibernateProxy, "The proxy should be of type INHibernateProxy");
//From it's proxy, we get a non-proxied (concrete?) version
var mauriceNonProxy = DomainObject.UnProxy < [[#variable5eb60c00]]> (mauriceProxy);
Assert.IsTrue( !(mauriceNonProxy is INHibernateProxy), "The non-proxy shouldn't be of type INHibernateProxy");
//We check if the name and ID matches (as they should be because they are the same entity!)
Assert.AreEqual(mauriceProxy.Name, mauriceNonProxy.Name, "The two objects should have the same name");
Assert.AreEqual(mauriceProxy.ID, mauriceNonProxy.ID, "The two objects should have the same ID");
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5eb60c00]]
ICat 
12[[#5eb60c00]]
Cat 
13[[#5eb60c00]]
ICat