public static void AddRangeSpecialCaseTest() { var instance = new CommonEventSpecialNumberArgDesc.InnerDescNormal(); var changedDescPropertyList = new List <string>(); instance.PropertyChanged += (sender, args) => { changedDescPropertyList.Add(args.PropertyName); }; var changedSpecialArgCaseListPropertyList = new List <string>(); instance.SpecialArgCaseList.PropertyChanged += (sender, args) => { changedSpecialArgCaseListPropertyList.Add(args.PropertyName); }; var changedSpecialArgCaseListCollectionArgList = new List <NotifyCollectionChangedEventArgs>(); instance.SpecialArgCaseList.CollectionChanged += (sender, args) => { changedSpecialArgCaseListCollectionArgList.Add(args); }; var errorOccured = false; try { var argCaseList = new List <CommonEventSpecialArgCase> { new CommonEventSpecialArgCase(0, "") }; instance.AddRangeSpecialCase(argCaseList); } catch (Exception ex) { logger.Exception(ex); errorOccured = true; } // エラーが発生すること Assert.IsTrue(errorOccured); // プロパティ変更通知が発火していないこと Assert.AreEqual(changedDescPropertyList.Count, 0); Assert.AreEqual(changedSpecialArgCaseListPropertyList.Count, 0); Assert.AreEqual(changedSpecialArgCaseListCollectionArgList.Count, 0); }