Exemplo n.º 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");
         }
     }
 }
Exemplo n.º 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);
                }
            }
        }
Exemplo n.º 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");
            }
        }
Exemplo n.º 4
0
 public override void Consume(string input)
 {
     if (!input.Equals("Test1"))
     {
         StaticTestHelper.FailTest("Wrong input received: " + input);
     }
     else
     {
         StaticTestHelper.PassTest("Correct input received");
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 6
0
 public override void ProcessWatermark(Watermark wm, Metadata metadata)
 {
     wmCount++;
     if (wmCount != 2)
     {
         StaticTestHelper.TempFailTest("Wmcount !=2 actual: " + wmCount);
     }
     else
     {
         StaticTestHelper.PassTest("Wmcount == 2");
     }
 }
Exemplo n.º 7
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));
            }
        }
Exemplo n.º 8
0
        public override void Consume(string input)
        {
            if (val == "")
            {
                val = input;
            }

            if (val != input)
            {
                StaticTestHelper.FailTest("Unexpected value received");
            }
            else
            {
                StaticTestHelper.PassTest("Value received");
            }
        }
Exemplo n.º 9
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);
            }
        }
Exemplo n.º 10
0
        public override void ProcessWatermark(Watermark wm, Metadata metadata)
        {
            if (wmCount == 0)
            {
                if (wm.TimeStamp != new DateTime(2019, 10, 10, 10, 10, 9))
                {
                    error = true;
                }
            }
            else if (wmCount == 1)
            {
                if (wm.TimeStamp != new DateTime(2019, 10, 10, 10, 10, 10, 100))
                {
                    error = true;
                }
            }
            else if (wmCount == 2)
            {
                if (wm.TimeStamp != new DateTime(2019, 10, 10, 10, 10, 11, 500))
                {
                    error = true;
                }
            }

            wmCount++;
            if (wmCount != 3)
            {
                StaticTestHelper.TempFailTest("Wmcount != 3, actual: " + wmCount);
            }
            else
            {
                if (!error)
                {
                    StaticTestHelper.PassTest("WmCount == 3");
                }
            }
        }