public void IfBothInputsArePopulatedStringWins(string inputString, int?inputInt, bool expectedOutput)
        {
            var testClass = new ConvertToBoolean();
            var result    = testClass.DoConversion(inputString, inputInt);

            Assert.AreEqual(expectedOutput, result);
        }
        public void HappyPath(string inputString, int?inputInt, bool expectedOutput)
        {
            var testClass = new ConvertToBoolean();
            var result    = testClass.DoConversion(inputString, inputInt);

            Assert.AreEqual(expectedOutput, result);
        }
    public static int Main()
    {
        ConvertToBoolean testObj = new ConvertToBoolean();

        TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToBoolean(Int32)");
        if(testObj.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }
Beispiel #4
0
    public static int Main()
    {
        ConvertToBoolean testObj = new ConvertToBoolean();

        TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToBoolean(Int16)");
        if (testObj.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return(100);
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return(0);
        }
    }
Beispiel #5
0
 internal protected virtual T Visit(ConvertToBoolean node)
 {
     return(Visit(node as Expression));
 }
        public void InvalidInputThrowsCorrectException(string inputString, int?inputInt)
        {
            var testClass = new ConvertToBoolean();

            Assert.Throws <InvalidPluginExecutionException>(() => testClass.DoConversion(inputString, inputInt));
        }
Beispiel #7
0
 protected override EP_VP1 Visit(ConvertToBoolean node)
 {
     return(this);
 }