public void RunTests() { for (int i = 0; i < Constants.NUM_TESTS; i += 1) { String lhs = GenBinary(); String rhs = GenBinary(); UnitTest unitTest = new UnitTest(lhs, rhs); String actualValue = solution.AddBinary(lhs, rhs); if (!unitTest.Accepts(actualValue)) { String message = String.Format("Expected {0} + {1} = {2} but got {3}", lhs, rhs, unitTest.ExpectedValue, actualValue); throw new Exception(message); } } Console.WriteLine("PASS"); }