public void GetReturnsDictionary() { //Arrange _mockCountByColor = Substitute.For <ICountByColor>(); var resultsGetter = new ResultsGetter(_mockCountByColor); var filename = "filename.jpg"; var expected = new Dictionary <string, int>(); _mockCountByColor.CountAllColors(filename).Returns(expected); //Act var actual = resultsGetter.Get(filename); //Assert Assert.AreEqual(expected, actual); }
public ResultsGetter(ICountByColor countByColor) { _countByColor = countByColor; }