コード例 #1
0
        private static void AssertBehaviorResults(TestVM vm, ExpectedResults results)
        {
            ValidationAssert.AreEqual(
                results.Properties,
                vm.GetResultFromBehavior(ValidationResultScope.PropertiesOnly)
                );

            ValidationAssert.AreEqual(
                results.ViewModel,
                vm.GetResultFromBehavior(ValidationResultScope.ViewModelValidationsOnly)
                );

            ValidationAssert.AreEqual(
                results.Self,
                vm.GetResultFromBehavior(ValidationResultScope.Self)
                );

            ValidationAssert.AreEqual(
                results.Descenants,
                vm.GetResultFromBehavior(ValidationResultScope.Descendants)
                );

            ValidationAssert.AreEqual(
                results.All,
                vm.GetResultFromBehavior(ValidationResultScope.All)
                );
        }