コード例 #1
0
        public void DoNotTouchUnmarkedClass()
        {
            var tb = new GeneratorTestBed(new INPCGenerator(),
                                          @"
using Melville.INPC;
  public partial class C
  { 
     private int intProp,ip2;
  }");

            tb.AssertNoDiagnostics();
            tb.NoSuchFile("C.INPC.cs");
        }
コード例 #2
0
        public void DoNotTouchClassWithWrongAttribute()
        {
            var tb = new GeneratorTestBed(new INPCGenerator(),
                                          @"
  namespace A2 {
   public class AutoNotifyAttribute : Attribute{}
}
  public partial class C
  { 
     [A2.AutoNotify] private int intProp,ip2;
  }");

            tb.AssertNoDiagnostics();
            tb.NoSuchFile("C.INPC.cs");
        }