コード例 #1
0
 public void CanMatchSuccess()
 {
     var request = new Request { Name = "Steffen", EMail = "*****@*****.**" };
     var result = Validation.ValidateInput(request);
     result.Match(
        (x, msgs) => { request.ShouldBeEquivalentTo(x); },
        msgs => { throw new Exception("wrong match case"); });
 }
コード例 #2
0
        public void CanCreateSuccess()
        {
            var request = new Request {
                Name = "Steffen", EMail = "*****@*****.**"
            };
            var result = Validation.ValidateInput(request);

            request.ShouldBeEquivalentTo(result.SucceededWith());
        }
コード例 #3
0
        public void CanMatchSuccess()
        {
            var request = new Request {
                Name = "Steffen", EMail = "*****@*****.**"
            };
            var result = Validation.ValidateInput(request);

            result.Match(
                (x, msgs) => { request.ShouldBeEquivalentTo(x); },
                msgs => { throw new Exception("wrong match case"); });
        }
コード例 #4
0
 public void CanCreateSuccess()
 {
     var request = new Request { Name = "Steffen", EMail = "*****@*****.**" };
     var result = Validation.ValidateInput(request);
     request.ShouldBeEquivalentTo(result.SucceededWith());
 }