public void GetPastDateTime_ReturnSoonDateTime() { var mockDateTimeHelper = new Mock <IDateTimeHelper>(); var fakeDate = new DateTime(2000, 1, 1); mockDateTimeHelper.Setup(o => o.GetDateTimeNow()) .Returns(fakeDate); ((FakerGenerator)generator).DateTimeHelper.Value = mockDateTimeHelper.Object; var soon = generator.Past(); soon.Should().BeBefore(fakeDate); }