示例#1
0
        public void LowerPipe_InputOutput_VerifyNextInvoke()
        {
            var mock  = new Mock <IPipeObject>();
            var lower = new Lower();

            // Set a mock object to the next pipe
            lower.NextPipe = mock.Object;

            string input = "HelLo";

            // Do the work
            lower.Invoke(input);

            //Output
            string expected = input.ToLower();

            // Check if the next pipe's invoke method is called with right parameter
            mock.Verify(i => i.Invoke(expected));

            mock.VerifyNoOtherCalls();
        }
示例#2
0
 public void OnEventLowered()
 {
     Lower.Invoke();
 }