Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
16 | 2 | 2 | 0.993 | class_member_declarations[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 16 | 14 | src/NHibernate.Test/PropertyTest/BasicSetterExceptionFixture.cs |
2 | 16 | 14 | src/NHibernate.Test/PropertyTest/FieldSetterExceptionFixture.cs |
| ||||
protected IPropertyAccessor _accessor; protected ISetter _setter; [SetUp] public void SetUp() { _accessor = PropertyAccessorFactory.GetPropertyAccessor("property"); _setter = _accessor.GetSetter( typeof(A), "Id"); } [Test] public void SetInvalidType() { A instance = new A(); var e = Assert.Throws < PropertyAccessException > (() => _setter.Set(instance, "wrong type")); Assert.That(e.Message, Is.EqualTo("The type System.String can not be assigned to a property of type System.Int32 setter of NHibernate.Test.PropertyTest.BasicSetterExceptionFixture+A.Id")); } |
| ||||
protected IPropertyAccessor _accessor; protected ISetter _setter; [SetUp] public void SetUp() { _accessor = PropertyAccessorFactory.GetPropertyAccessor("field"); _setter = _accessor.GetSetter( typeof(A), "Id"); } [Test] public void SetInvalidType() { A instance = new A(); var e = Assert.Throws < PropertyAccessException > (() => _setter.Set(instance, "wrong type")); Assert.That(e.Message, Is.EqualTo("The type System.String can not be assigned to a field of type System.Int32 setter of NHibernate.Test.PropertyTest.FieldSetterExceptionFixture+A.Id")); } |
| |||
protected IPropertyAccessor _accessor; protected ISetter _setter; [SetUp] public void SetUp() { _accessor = PropertyAccessorFactory.GetPropertyAccessor( [[#variable55ad7bc0]]); _setter = _accessor.GetSetter( typeof(A), "Id"); } [Test] public void SetInvalidType() { A instance = new A(); var e = Assert.Throws < PropertyAccessException > (() => _setter.Set(instance, "wrong type")); Assert.That(e.Message, Is.EqualTo( [[#variable5544e500]])); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#55ad7bc0]] | "property" |
1 | 2 | [[#55ad7bc0]] | "field" |
2 | 1 | [[#5544e500]] | "The type System.String can not be assigned to a property of type System.Int32 setter of NHibernate.Test.PropertyTest.BasicSetterExceptionFixture+A.Id" |
2 | 2 | [[#5544e500]] | "The type System.String can not be assigned to a field of type System.Int32 setter of NHibernate.Test.PropertyTest.FieldSetterExceptionFixture+A.Id" |