Пример #1
0
        public void GetSoonDateTime_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.Soon();

            soon.Should().BeAfter(fakeDate);
        }