Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
9 | 2 | 1 | 0.997 | statement_list[9] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 9 | 66 | src/NHibernate.Test/IdGen/Enhanced/SequenceStyleConfigUnitFixture.cs |
2 | 9 | 77 | src/NHibernate.Test/IdGen/Enhanced/SequenceStyleConfigUnitFixture.cs |
| ||||
// optimizer=hilo w/ increment > 1 => hilo props = new Dictionary<string, string> (); props[SequenceStyleGenerator.OptimizerParam] = OptimizerFactory.HiLo; props[SequenceStyleGenerator.IncrementParam] = "20"; generator = new SequenceStyleGenerator(); generator.Configure(NHibernateUtil.Int64, props, dialect); Assert.That(generator.DatabaseStructure, Is.AssignableFrom( typeof( SequenceStructure))); Assert.That(generator.Optimizer, Is.AssignableFrom( typeof( OptimizerFactory.HiLoOptimizer))); Assert.AreEqual(20, generator.Optimizer.IncrementSize); Assert.AreEqual(20, generator.DatabaseStructure.IncrementSize); |
| ||||
// optimizer=pooled w/ increment > 1 => hilo props = new Dictionary<string, string> (); props[SequenceStyleGenerator.OptimizerParam] = OptimizerFactory.Pool; props[SequenceStyleGenerator.IncrementParam] = "20"; generator = new SequenceStyleGenerator(); generator.Configure(NHibernateUtil.Int64, props, dialect); Assert.That(generator.DatabaseStructure, Is.AssignableFrom( typeof( SequenceStructure))); Assert.That(generator.Optimizer, Is.AssignableFrom( typeof( OptimizerFactory.HiLoOptimizer))); Assert.AreEqual(20, generator.Optimizer.IncrementSize); Assert.AreEqual(20, generator.DatabaseStructure.IncrementSize); |
| |||
// optimizer=pooled w/ increment > 1 => hilo // optimizer=hilo w/ increment > 1 => hilo props = new Dictionary<string, string> (); props[SequenceStyleGenerator.OptimizerParam] = OptimizerFactory. [[#variable54ac3540]]; props[SequenceStyleGenerator.IncrementParam] = "20"; generator = new SequenceStyleGenerator(); generator.Configure(NHibernateUtil.Int64, props, dialect); Assert.That(generator.DatabaseStructure, Is.AssignableFrom( typeof(SequenceStructure))); Assert.That(generator.Optimizer, Is.AssignableFrom( typeof(OptimizerFactory.HiLoOptimizer))); Assert.AreEqual(20, generator.Optimizer.IncrementSize); Assert.AreEqual(20, generator.DatabaseStructure.IncrementSize); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#54ac3540]] | Pool |
1 | 2 | [[#54ac3540]] | HiLo |