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