public ScoreCalculationServiceTests() { validationMock = new Mock <IScoreCalculationValidator>(); validationMock.Setup(s => s.Validate(It.IsAny <IList <Frame> >())) .Returns(() => (true, "")); service = new ScoreCalculationService(validationMock.Object); }
public void TestScoreCalcuate() { foreach (var item in stringDictionary) { var arr = item.Key.Select(c => (char?)c).ToArray(); var service = new ScoreCalculationService(); service.Input = arr; int score = service.ScoreCalculate(); Assert.AreEqual(score, item.Value); } }
public void TestGetScore_ShouldReturnCorrectScore() { var testStrings = GetTestStrings(); foreach (var testString in testStrings) { var scoreCalculationService = new ScoreCalculationService(testString); var result = scoreCalculationService.ScoreCalculate(); result = 1; Assert.AreEqual(result, -1); } }