Пример #1
0
 public override void Consume(string input)
 {
     if (index == 0)
     {
         if (!"Test1".Equals(input))
         {
             StaticTestHelper.FailTest("Wrong input received, expected Test1 | got: " + input);
         }
         else
         {
             StaticTestHelper.PassTest("Correct value received");
         }
         index++;
     }
     else
     {
         StaticTestHelper.TempFailTest("Temp fail for index 2 ");
         if (!"Test2".Equals(input))
         {
             StaticTestHelper.FailTest("Wrong input received, expected Test2 | got: " + input);
         }
         else
         {
             StaticTestHelper.PassTest("Correct value received");
         }
     }
 }
Пример #2
0
        public override void Consume(TypeB input)
        {
            if (index == 0)
            {
                if (!input.Field2.Equals("0"))
                {
                    StaticTestHelper.FailTest("Wrong input received, expected: 0 |actual: " + input.Field2);
                }
                else
                {
                    StaticTestHelper.PassTest("Expected input received, expected: 0 | actual: " + input.Field2);
                }

                index++;
            }
            else
            {
                StaticTestHelper.TempFailTest("Temp fail test for index 1");

                if (!input.Field2.Equals("1"))
                {
                    StaticTestHelper.FailTest("Wrong input received, expected: 1 |actual: " + input.Field2);
                }
                else
                {
                    StaticTestHelper.PassTest("Expected input received, expected: 1 | actual: " + input.Field2);
                }
            }
        }
Пример #3
0
        public override void Consume(string input)
        {
            if (!success)
            {
                StaticTestHelper.TempFailTest("Not yet received from both inputs");
            }

            if (input == "Test1")
            {
                gotTest1 = true;
            }
            else if (input == "Test2")
            {
                gotTest2 = true;
            }
            else
            {
                StaticTestHelper.FailTest("Unexpected input: " + input);
            }

            if (gotTest2 && gotTest1)
            {
                success = true;
            }
            if (success)
            {
                StaticTestHelper.PassTest("Received from both inputs already");
            }
        }
Пример #4
0
 public override void Consume(string input)
 {
     if (!input.Equals("Test1"))
     {
         StaticTestHelper.FailTest("Wrong input received: " + input);
     }
     else
     {
         StaticTestHelper.PassTest("Correct input received");
     }
 }
Пример #5
0
 public override void Consume(int input)
 {
     StaticTestHelper.LogMessage("Logging input: " + input);
     if (input == 8 || input == 10)
     {
         StaticTestHelper.PassTest("Got expected value");
     }
     else
     {
         StaticTestHelper.FailTest("got unexpected value : " + input);
     }
 }
Пример #6
0
        public override void Consume(string input)
        {
            if (val == "")
            {
                StaticTestHelper.PassTest("Got a value");
                val = input;
            }

            if (val != input)
            {
                StaticTestHelper.FailTest(string.Format("Wrong value received, expected: {0}, got {1} ", val, input));
            }
        }
Пример #7
0
        public override void Consume(string input)
        {
            if (val == "")
            {
                val = input;
            }

            if (val != input)
            {
                StaticTestHelper.FailTest("Unexpected value received");
            }
            else
            {
                StaticTestHelper.PassTest("Value received");
            }
        }
Пример #8
0
        public override void Consume(int input)
        {
            if (input == 4 || input == 5 || input == 100 || input == 8 || input == 10)
            {
                StaticTestHelper.PassTest("Correct input received: " + input);
                count++;
            }
            else
            {
                StaticTestHelper.FailTest("Completely incorrect value received: " + input);
            }

            if (count != 5)
            {
                StaticTestHelper.TempFailTest("Count is not 5, actual: " + count);
            }
        }