File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1337,27 +1337,27 @@ public partial class SampleViewModel : ObservableValidator
1337
1337
}
1338
1338
1339
1339
[ TestMethod ]
1340
- public void InvalidTypeForNotifyPropertyChangedRecipientsError ( )
1340
+ public async Task InvalidTypeForNotifyPropertyChangedRecipientsError ( )
1341
1341
{
1342
1342
string source = """
1343
1343
using CommunityToolkit.Mvvm.ComponentModel;
1344
1344
1345
1345
namespace MyApp
1346
1346
{
1347
1347
[NotifyPropertyChangedRecipients]
1348
- public partial class MyViewModel : ObservableObject
1348
+ public partial class {|MVVMTK0027: MyViewModel|} : ObservableObject
1349
1349
{
1350
1350
[ObservableProperty]
1351
1351
public int number;
1352
1352
}
1353
1353
}
1354
1354
""" ;
1355
1355
1356
- VerifyGeneratedDiagnostics < ObservablePropertyGenerator > ( source , "MVVMTK0027" ) ;
1356
+ await VerifyAnalyzerDiagnosticsAndSuccessfulGeneration < InvalidClassLevelNotifyPropertyChangedRecipientsAttributeAnalyzer > ( source , LanguageVersion . CSharp8 ) ;
1357
1357
}
1358
1358
1359
1359
[ TestMethod ]
1360
- public void InvalidTypeForNotifyDataErrorInfoError ( )
1360
+ public async Task InvalidTypeForNotifyDataErrorInfoError ( )
1361
1361
{
1362
1362
string source = """
1363
1363
using System.ComponentModel.DataAnnotations;
@@ -1366,16 +1366,13 @@ public void InvalidTypeForNotifyDataErrorInfoError()
1366
1366
namespace MyApp
1367
1367
{
1368
1368
[NotifyDataErrorInfo]
1369
- public partial class SampleViewModel : ObservableObject
1369
+ public partial class {|MVVMTK0028: SampleViewModel|} : ObservableObject
1370
1370
{
1371
- [ObservableProperty]
1372
- [Required]
1373
- private string name;
1374
1371
}
1375
1372
}
1376
1373
""" ;
1377
1374
1378
- VerifyGeneratedDiagnostics < ObservablePropertyGenerator > ( source , "MVVMTK0006" , "MVVMTK0028" ) ;
1375
+ await VerifyAnalyzerDiagnosticsAndSuccessfulGeneration < InvalidClassLevelNotifyDataErrorInfoAttributeAnalyzer > ( source , LanguageVersion . CSharp8 ) ;
1379
1376
}
1380
1377
1381
1378
[ TestMethod ]
You can’t perform that action at this time.
0 commit comments