Пример #1
0
        public (bool, string) Run(TestCaseMetadata <TwoSumData> testCase)
        {
            var testInstance = new TestCode();
            var actual       = testInstance.TwoSum(testCase.Data.ArgumentNums, testCase.Data.ArgumentTarget);

            if ((actual[0] != testCase.Data.Result[0] || actual[1] != testCase.Data.Result[1]) && (actual[1] != testCase.Data.Result[0] || actual[0] != testCase.Data.Result[1]))
            {
                return(false, "");
            }
            return(true, null);
        }
Пример #2
0
 public (bool, string) Run <T>(TestCaseMetadata <T> testCase)
 {
     return(Run(testCase as TestCaseMetadata <TwoSumData>));
 }