public void TestInitialize() { scope = AutofacContainer.GetLifetimeScope(); editPerson = scope.Resolve <IEditPerson>(); var parentDto = scope.Resolve <IReadOnlyList <PersonDto> >().Where(p => !p.FatherId.HasValue && !p.MotherId.HasValue).First(); editPerson.FillFromDto(parentDto); editPerson.MarkOld(); editPerson.MarkUnmodified(); Assert.IsFalse(editPerson.IsModified); Assert.IsFalse(editPerson.IsNew); Assert.IsFalse(editPerson.IsSavable); }
public void TestInitialize() { scope = AutofacContainer.GetLifetimeScope(); var parentDto = scope.Resolve <IReadOnlyList <PersonDto> >().Where(p => !p.FatherId.HasValue && !p.MotherId.HasValue).First(); list = scope.Resolve <IEditPersonList>(); list.FillFromDto(parentDto); list.MarkUnmodified(); list.MarkOld(); child = scope.Resolve <IEditPerson>(); child.MarkUnmodified(); child.MarkOld(); child.MarkAsChild(); list.Add(child); Assert.IsFalse(list.IsBusy); }
public void TestInitialize() { scope = AutofacContainer.GetLifetimeScope(); var persons = scope.Resolve <IReadOnlyList <PersonDto> >(); parent = scope.Resolve <IEditPerson>(); parent.FillFromDto(persons.Where(p => !p.FatherId.HasValue && !p.MotherId.HasValue).First()); child = scope.Resolve <IEditPerson>(); child.FillFromDto(persons.Where(p => p.FatherId == parent.Id).First()); parent.Child = child; child.MarkOld(); child.MarkUnmodified(); child.MarkAsChild(); parent.MarkOld(); parent.MarkUnmodified(); }