public void Generate() { var tb = new GeneratorTestBed(new INPCGenerator(), @" using Melville.INPC; public partial class C { [AutoNotify] private int ip2; } "); tb.AssertNoDiagnostics(); tb.FileEqual("C.INPC.cs", @"#nullable enable using Melville.INPC; public partial class C: Melville.INPC.IExternalNotifyPropertyChanged { public event System.ComponentModel.PropertyChangedEventHandler? PropertyChanged; void Melville.INPC.IExternalNotifyPropertyChanged.OnPropertyChanged(string propertyName) { this.PropertyChanged?.Invoke(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); } public int Ip2 { get => this.ip2; set { this.ip2 = value; ((Melville.INPC.IExternalNotifyPropertyChanged)this).OnPropertyChanged(""Ip2""); } } } "); }