public async Task Input_Process_OutputNotExpected() { var fakeDataProvider = A.Fake <IDataProvider>(); A.CallTo(() => fakeDataProvider.GetData()).Returns(InputData()); var dataProvider = DataProviderFactory.Create(); var resolver = new Sudoku_Solver.Sudoku9X9Solver( InputValidatorFactory.Create()); var(result, outputMatrix) = await resolver.Process(await fakeDataProvider.GetData()); Assert.IsTrue(result); Assert.IsFalse(MatchMatricResult(outputMatrix, InvalidExpectedOutput())); }
public void Input_ValidData_Success() { var validator = InputValidatorFactory.Create(); validator.Validate(ValidData()); }
public void Input_InvalidNumber_ThrowInputValidatorEx() { var validator = InputValidatorFactory.Create(); Assert.Throws <InputValidatorException>(() => validator.Validate(InvalidNumberInInput())); }
public void Input_DuplicateNumberInColumn_ThrowInputValidatorEx() { var validator = InputValidatorFactory.Create(); Assert.Throws <InputValidatorException>(() => validator.Validate(InvalidDataWithDuplicateInColumn())); }
public void Input_MinDataNotPresent_ThrowInputValidatorEx() { var validator = InputValidatorFactory.Create(); Assert.Throws <InputValidatorException>(() => validator.Validate(MandatoryDataNotPresent())); }
public void Input_Matrix9X9NotMatching_ThrowInputValidatorE() { var validator = InputValidatorFactory.Create(); Assert.Throws <InputValidatorException>(() => validator.Validate(InvalidMatrixSize())); }