CloneSet419


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
16220.993class_member_declarations[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11614
src/NHibernate.Test/PropertyTest/BasicSetterExceptionFixture.cs
21614
src/NHibernate.Test/PropertyTest/FieldSetterExceptionFixture.cs
Clone Instance
1
Line Count
16
Source Line
14
Source File
src/NHibernate.Test/PropertyTest/BasicSetterExceptionFixture.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"));
                }



Clone Instance
2
Line Count
16
Source Line
14
Source File
src/NHibernate.Test/PropertyTest/FieldSetterExceptionFixture.cs

                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"));
                }



Clone AbstractionParameter Count: 2Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#55ad7bc0]]
"property" 
12[[#55ad7bc0]]
"field" 
21[[#5544e500]]
"The type System.String can not be assigned to a property of type System.Int32 setter of NHibernate.Test.PropertyTest.BasicSetterExceptionFixture+A.Id" 
22[[#5544e500]]
"The type System.String can not be assigned to a field of type System.Int32 setter of NHibernate.Test.PropertyTest.FieldSetterExceptionFixture+A.Id"