コード例 #1
0
        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);
        }
コード例 #2
0
 public ResultsGetter(ICountByColor countByColor)
 {
     _countByColor = countByColor;
 }