Beispiel #1
0
 public bool Equals(InputModelWithEquals other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.Name, Name) && other.Age == Age);
 }
        public void assert_redirect_to_a_target_via_equals()
        {
            var input = new InputModelWithEquals {Name = "Luke"};
            FubuContinuation continuation = FubuContinuation.RedirectTo(input);

            continuation.AssertWasRedirectedTo(new InputModelWithEquals {Name = "Luke"});

            shouldFail(() => continuation.AssertWasRedirectedTo(new InputModelWithEquals()));
            shouldFail(() => continuation.AssertWasTransferedTo(input));
            shouldFail(() => continuation.AssertWasContinuedToNextBehavior());

            shouldFail(() => continuation.AssertWasTransferedTo<ControllerTarget>(x => x.OneInOneOut(null)));
            shouldFail(() => continuation.AssertWasRedirectedTo<ControllerTarget>(x => x.OneInOneOut(null)));
        }
 public bool Equals(InputModelWithEquals other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.Name, Name) && other.Age == Age;
 }