public void AddTimeUnits_returnsValueFromProcessor() { //Arrange Mock <ITimeframeProcessor> mockProcessor = new Mock <ITimeframeProcessor>(); DateTime expectedDateTime = new DateTime(); mockProcessor.Setup(p => p.AddTimeUnits(It.IsAny <DateTime>(), It.IsAny <int>(), It.IsAny <int>())).Returns(expectedDateTime); Timeframe timeframe = defaultTimeframe(); timeframe.InjectTimeframeProcessor(mockProcessor.Object); //Act. DateTime datetime = timeframe.AddTimeUnits(new DateTime(), 5); //Assert. Assert.AreEqual(expectedDateTime, datetime); }