Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
12 | 5 | 4 | 0.975 | statement_list[11] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 14 | 60 | src/NHibernate.Test/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs |
2 | 12 | 84 | src/NHibernate.Test/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs |
3 | 12 | 108 | src/NHibernate.Test/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs |
4 | 12 | 130 | src/NHibernate.Test/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs |
5 | 12 | 153 | src/NHibernate.Test/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs |
| ||||
Assert.AreEqual(initialInsertCount, Sfi.Statistics.EntityInsertCount, "persist on identity column not delayed"); Assert.AreEqual(0, myEntity2.Id); // an explicit flush should cause execution of the delayed insertion s.Flush(); Assert.AreEqual(initialInsertCount + 1, Sfi.Statistics.EntityInsertCount, "delayed persist insert not executed on flush"); s.Close(); s = OpenSession(); s.BeginTransaction(); s.Delete(myEntity1); s.Delete(myEntity2); s.Transaction.Commit(); s.Close(); |
| ||||
Assert.AreEqual(initialInsertCount, Sfi.Statistics.EntityInsertCount, "persist on identity column not delayed"); Assert.AreEqual(0, myEntity.Id); s.Flush(); Assert.AreEqual(initialInsertCount + 2, Sfi.Statistics.EntityInsertCount, "delayed persist insert not executed on flush"); s.Close(); s = OpenSession(); s.BeginTransaction(); s.Delete("from MyChild"); s.Delete("from MyEntity"); s.Transaction.Commit(); s.Close(); |
| ||||
Assert.AreEqual(initialInsertCount, Sfi.Statistics.EntityInsertCount, "persist on identity column not delayed"); Assert.AreEqual(0, myEntity2.Id); s.Flush(); Assert.AreEqual(initialInsertCount + 2, Sfi.Statistics.EntityInsertCount, "delayed persist insert not executed on flush"); s.Close(); s = OpenSession(); s.BeginTransaction(); s.Delete("from MyChild"); s.Delete("from MyEntity"); s.Transaction.Commit(); s.Close(); |
| ||||
Assert.AreEqual(initialInsertCount, Sfi.Statistics.EntityInsertCount, "persist on identity column not delayed"); Assert.AreEqual(0, myEntity.Id); s.Flush(); Assert.AreEqual(initialInsertCount + 2, Sfi.Statistics.EntityInsertCount, "delayed persist insert not executed on flush"); s.Close(); s = OpenSession(); s.BeginTransaction(); s.Delete("from MyEntity"); s.Delete("from MySibling"); s.Transaction.Commit(); s.Close(); |
| ||||
Assert.AreEqual(initialInsertCount, Sfi.Statistics.EntityInsertCount, "persist on identity column not delayed"); Assert.AreEqual(0, myEntity2.Id); s.Flush(); Assert.AreEqual(initialInsertCount + 2, Sfi.Statistics.EntityInsertCount, "delayed persist insert not executed on flush"); s.Close(); s = OpenSession(); s.BeginTransaction(); s.Delete("from MySibling"); s.Delete("from MyEntity"); s.Transaction.Commit(); s.Close(); |
| |||
Assert.AreEqual(initialInsertCount, Sfi.Statistics.EntityInsertCount, "persist on identity column not delayed"); Assert.AreEqual(0, [[#variable6c2f7a40]].Id); // an explicit flush should cause execution of the delayed insertion s.Flush(); Assert.AreEqual(initialInsertCount + [[#variable6e5dd700]], Sfi.Statistics.EntityInsertCount, "delayed persist insert not executed on flush"); s.Close(); s = OpenSession(); s.BeginTransaction(); s.Delete( [[#variable6e5dcd20]]); s.Delete( [[#variable6f4af460]]); s.Transaction.Commit(); s.Close(); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6c2f7a40]] | myEntity2 |
1 | 2 | [[#6c2f7a40]] | myEntity |
1 | 3 | [[#6c2f7a40]] | myEntity2 |
1 | 4 | [[#6c2f7a40]] | myEntity |
1 | 5 | [[#6c2f7a40]] | myEntity2 |
2 | 1 | [[#6e5dd700]] | 2 |
2 | 2 | [[#6e5dd700]] | 2 |
2 | 3 | [[#6e5dd700]] | 2 |
2 | 4 | [[#6e5dd700]] | 2 |
2 | 5 | [[#6e5dd700]] | 1 |
3 | 1 | [[#6e5dcd20]] | "from MySibling" |
3 | 2 | [[#6e5dcd20]] | "from MyEntity" |
3 | 3 | [[#6e5dcd20]] | "from MyChild" |
3 | 4 | [[#6e5dcd20]] | "from MyChild" |
3 | 5 | [[#6e5dcd20]] | myEntity1 |
4 | 1 | [[#6f4af460]] | "from MyEntity" |
4 | 2 | [[#6f4af460]] | "from MySibling" |
4 | 3 | [[#6f4af460]] | "from MyEntity" |
4 | 4 | [[#6f4af460]] | "from MyEntity" |
4 | 5 | [[#6f4af460]] | myEntity2 |