public void FocusDateTimePropertyAutoUpdatesWhenReset() { var activityList = new ActivityList(new ActivityBoard()); FocusDateView focusDateView = activityList.ViewModes.FocusDateView.Get(); focusDateView.FocusDateTime = DateTime.Now + TimeSpan.FromDays(1); focusDateView.ResetFocusDateTimeToNow(); var focusDateTime = focusDateView.FocusDateTime; System.Threading.Thread.Sleep(TimeSpan.FromMilliseconds(2)); Assert.That(focusDateTime, Is.LessThan(focusDateView.FocusDateTime)); }
public void DtoAndDomainRoundTrip() { Fixture fixture = TestHelper.CreateSerializationAutoFixture(); FocusDateViewDto sourceDto = fixture.Create <FocusDateViewDto>(); FocusDateView domain = FocusDateView.FromDto(sourceDto); FocusDateViewDto targetDto = FocusDateView.ToDto(domain); var sourceDtoLikeness = sourceDto.AsSource().OfLikeness <FocusDateViewDto>(); sourceDtoLikeness.ShouldEqual(targetDto); }