public void WhenSetOnlyPropertyNoMatch()
        {
            var pattern = new NoSetterPropertyToFieldPattern();
            var member  = typeof(MyClass).GetProperty("SetOnlyProperty");

            pattern.Match(member).Should().Be.False();
        }
        public void WhenReadOnlyPropertyWithDifferentBackFieldMatch()
        {
            var pattern = new NoSetterPropertyToFieldPattern();
            var member  = typeof(MyClass).GetProperty("WithDifferentBackField");

            pattern.Match(member).Should().Be.False();
        }
        public void WhenPropertyWithSameBackFieldNoMatch()
        {
            var pattern = new NoSetterPropertyToFieldPattern();
            var member  = typeof(MyClass).GetProperty("SameTypeOfBackField");

            pattern.Match(member).Should().Be.False();
        }
 public void WhenFieldNoMatch()
 {
     var pattern = new NoSetterPropertyToFieldPattern();
     var member = typeof(MyClass).GetField("aField",
                                                                                  BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
     pattern.Match(member).Should().Be.False();
 }
        public void WhenFieldNoMatch()
        {
            var pattern = new NoSetterPropertyToFieldPattern();
            var member  = typeof(MyClass).GetField("aField",
                                                   BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);

            pattern.Match(member).Should().Be.False();
        }
 public void WhenSetOnlyPropertyNoMatch()
 {
     var pattern = new NoSetterPropertyToFieldPattern();
     var member = typeof(MyClass).GetProperty("SetOnlyProperty");
     pattern.Match(member).Should().Be.False();
 }
 public void WhenReadOnlyPropertyWithSameBackFieldMatch()
 {
     var pattern = new NoSetterPropertyToFieldPattern();
     var member = typeof(MyClass).GetProperty("ReadOnlyWithSameBackField");
     pattern.Match(member).Should().Be.True();
 }
 public void WhenPropertyWithSameBackFieldNoMatch()
 {
     var pattern = new NoSetterPropertyToFieldPattern();
     var member = typeof(MyClass).GetProperty("SameTypeOfBackField");
     pattern.Match(member).Should().Be.False();
 }