Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
18 | 2 | 4 | 0.984 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 18 | 11 | src/NHibernate.Test/MappingExceptions/DuplicateMappingFixture.cs |
2 | 19 | 32 | src/NHibernate.Test/MappingExceptions/DuplicateMappingFixture.cs |
| ||||
[Test] public void MappingTheSameClassTwiceShouldThrowException() { Configuration cfg = new Configuration(); string resource = "NHibernate.Test.MappingExceptions.DuplicateClassMapping.hbm.xml"; try { cfg.AddResource(resource, this.GetType().Assembly); cfg.BuildSessionFactory(); Assert.Fail("Should have thrown exception when we mapped the same class twice"); } catch (MappingException me) { Assert.AreEqual( "Could not compile the mapping document: NHibernate.Test.MappingExceptions.DuplicateClassMapping.hbm.xml", me.Message); Assert.IsTrue(me.InnerException.GetType() == typeof(DuplicateMappingException)); Assert.AreEqual("Duplicate class/entity mapping NHibernate.Test.MappingExceptions.A", me.InnerException.Message); } } |
| ||||
[Test] public void MappingSameCollectionTwiceShouldThrow() { Configuration cfg = new Configuration(); string resource = "NHibernate.Test.MappingExceptions.DuplicateCollectionMapping.hbm.xml"; try { cfg.AddResource(resource, this.GetType().Assembly); cfg.BuildSessionFactory(); Assert.Fail("Should have thrown exception when we mapped the same class twice"); } catch (MappingException me) { Assert.AreEqual( "Could not compile the mapping document: NHibernate.Test.MappingExceptions.DuplicateCollectionMapping.hbm.xml", me.Message); Assert.IsTrue(me.InnerException.GetType() == typeof(DuplicateMappingException)); Assert.AreEqual("Duplicate collection role mapping NHibernate.Test.MappingExceptions.A.Children", me.InnerException.Message); } } |
| |||
[Test] public void [[#variable66359520]]() { Configuration cfg = new Configuration(); string resource = [[#variable66359500]]; try { cfg.AddResource(resource, this.GetType().Assembly); cfg.BuildSessionFactory(); Assert.Fail("Should have thrown exception when we mapped the same class twice"); } catch (MappingException me) { Assert.AreEqual( [[#variable66358da0]], me.Message); Assert.IsTrue(me.InnerException.GetType() == typeof(DuplicateMappingException)); Assert.AreEqual( [[#variable66359ee0]], me.InnerException.Message); } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#66359520]] | MappingTheSameClassTwiceShouldThrowException |
1 | 2 | [[#66359520]] | MappingSameCollectionTwiceShouldThrow |
2 | 1 | [[#66359500]] | "NHibernate.Test.MappingExceptions.DuplicateClassMapping.hbm.xml" |
2 | 2 | [[#66359500]] | "NHibernate.Test.MappingExceptions.DuplicateCollectionMapping.hbm.xml" |
3 | 1 | [[#66358da0]] | "Could not compile the mapping document: NHibernate.Test.MappingExceptions.DuplicateClassMapping.hbm.xml" |
3 | 2 | [[#66358da0]] | "Could not compile the mapping document: NHibernate.Test.MappingExceptions.DuplicateCollectionMapping.hbm.xml" |
4 | 1 | [[#66359ee0]] | "Duplicate class/entity mapping NHibernate.Test.MappingExceptions.A" |
4 | 2 | [[#66359ee0]] | "Duplicate collection role mapping NHibernate.Test.MappingExceptions.A.Children" |