public void GetDifferenceBetweenDates_returnsValueFromProcessor() { //Arrange Mock <ITimeframeProcessor> mockProcessor = new Mock <ITimeframeProcessor>(); mockProcessor.Setup(p => p.CountTimeUnits(It.IsAny <DateTime>(), It.IsAny <DateTime>(), It.IsAny <int>())).Returns(10); Timeframe timeframe = defaultTimeframe(); timeframe.InjectTimeframeProcessor(mockProcessor.Object); //Act. int difference = timeframe.GetDifferenceBetweenDates(new DateTime(), new DateTime()); //Assert. Assert.AreEqual(10, difference); }