Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
41 | 2 | 5 | 0.963 | compilation_unit |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 41 | 1 | src/NHibernate.Test/Generatedkeys/ByTrigger/GeneratedIdentityFixture.cs |
2 | 41 | 1 | src/NHibernate.Test/Generatedkeys/Seqidentity/SequenceIdentityFixture.cs |
| ||||
using System.Collections; using NUnit.Framework; namespace NHibernate.Test.Generatedkeys.ByTrigger { [TestFixture] public class GeneratedIdentityFixture : TestCase { protected override IList Mappings { get { return new [] { "Generatedkeys.ByTrigger.MyEntity.hbm.xml" } ; } } protected override string MappingsAssembly { get { return "NHibernate.Test"; } } protected override bool AppliesTo(Dialect.Dialect dialect) { return dialect is Dialect.Oracle8iDialect; } [Test] public void GetGeneratedKeysSupport() { ISession session = OpenSession(); session.BeginTransaction(); var e = new MyEntity { Name = "entity-1" } ; session.Save(e); // this insert should happen immediately! Assert.AreEqual(1, e.Id, "id not generated through forced insertion"); session.Delete(e); session.Transaction.Commit(); session.Close(); } } } |
| ||||
using System.Collections; using NUnit.Framework; namespace NHibernate.Test.Generatedkeys.Seqidentity { [TestFixture] public class SequenceIdentityFixture : TestCase { protected override IList Mappings { get { return new [] { "Generatedkeys.Seqidentity.MyEntity.hbm.xml" } ; } } protected override string MappingsAssembly { get { return "NHibernate.Test"; } } protected override bool AppliesTo(Dialect.Dialect dialect) { return dialect.SupportsSequences; } [Test] public void SequenceIdentityGenerator() { ISession session = OpenSession(); session.BeginTransaction(); var e = new MyEntity { Name = "entity-1" } ; session.Save(e); // this insert should happen immediately! Assert.AreEqual(1, e.Id, "id not generated through forced insertion"); session.Delete(e); session.Transaction.Commit(); session.Close(); } } } |
| |||
using System.Collections; using NUnit.Framework; namespace NHibernate.Test.Generatedkeys. [[#variable6c5371c0]] { [TestFixture] public class [[#variable6c537120]]: TestCase { protected override IList Mappings { get { return new [] { [[#variable6c537140]] } ; } } protected override string MappingsAssembly { get { return "NHibernate.Test"; } } protected override bool AppliesTo(Dialect.Dialect dialect) { return [[#variable6c5370e0]]; } [Test] public void [[#variable6c5370c0]]() { ISession session = OpenSession(); session.BeginTransaction(); var e = new MyEntity { Name = "entity-1" } ; session.Save(e); // this insert should happen immediately! Assert.AreEqual(1, e.Id, "id not generated through forced insertion"); session.Delete(e); session.Transaction.Commit(); session.Close(); } } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6c5371c0]] | ByTrigger |
1 | 2 | [[#6c5371c0]] | Seqidentity |
2 | 1 | [[#6c537120]] | GeneratedIdentityFixture |
2 | 2 | [[#6c537120]] | SequenceIdentityFixture |
3 | 1 | [[#6c537140]] | "Generatedkeys.ByTrigger.MyEntity.hbm.xml" |
3 | 2 | [[#6c537140]] | "Generatedkeys.Seqidentity.MyEntity.hbm.xml" |
4 | 1 | [[#6c5370e0]] | dialect is Dialect.Oracle8iDialect |
4 | 2 | [[#6c5370e0]] | dialect.SupportsSequences |
5 | 1 | [[#6c5370c0]] | GetGeneratedKeysSupport |
5 | 2 | [[#6c5370c0]] | SequenceIdentityGenerator |