Beispiel #1
0
 public void ModelState_ArrayAccessExpression()
 {
     Assert.AreEqual("AnotherProperty().TestViewModel2().Collection()[0]().StringValue", ValidationErrorFactory.CreateModelError(viewModel, v => v.AnotherProperty.TestViewModel2.Collection[0].StringValue, "").PropertyPath);
 }
Beispiel #2
0
 public void ModelState_SingleRenamedProperty()
 {
     Assert.AreEqual("rp", ValidationErrorFactory.CreateModelError(viewModel, v => v.RenamedProperty, "").PropertyPath);
 }
Beispiel #3
0
 public void ModelState_NestedViewModelExpression()
 {
     Assert.AreEqual("AnotherProperty().StringProp", ValidationErrorFactory.CreateModelError(viewModel, v => v.AnotherProperty.StringProp, "").PropertyPath);
 }
Beispiel #4
0
 public void ModelState_SinglePropertyExpression()
 {
     Assert.AreEqual("MyProperty", ValidationErrorFactory.CreateModelError(viewModel, v => v.MyProperty, "").PropertyPath);
 }