示例#1
0
 public void TestInitailize()
 {
     scope = AutofacContainer.GetLifetimeScope();
     List  = scope.Resolve <IValidateObjectList>();
     Child = scope.Resolve <IValidateObject>();
     List.Add(Child);
 }
示例#2
0
 public void TestInitailize()
 {
     scope          = AutofacContainer.GetLifetimeScope();
     validate       = scope.Resolve <IValidateObject>();
     child          = scope.Resolve <IValidateObject>();
     validate.Child = child;
 }
示例#3
0
 public void TestInitailize()
 {
     scope       = AutofacContainer.GetLifetimeScope().Resolve <IServiceScope>();
     target      = scope.Resolve <IBaseObject>();
     target.ID   = Id;
     target.Name = Name;
 }
 public void TestInitailize()
 {
     scope       = AutofacContainer.GetLifetimeScope().Resolve <IServiceScope>();
     target      = scope.Resolve <IEditObjectList>();
     target.ID   = Id;
     target.Name = Name;
     resolver    = scope.Resolve <FatClientContractResolver>();
 }
        public void TestInitailize()
        {
            scope = AutofacContainer.GetLifetimeScope();
            var validateDto = scope.Resolve <IReadOnlyList <PersonDto> >().Where(p => !p.FatherId.HasValue && !p.MotherId.HasValue).First();

            validate       = scope.Resolve <IValidateAsyncObject>();
            child          = scope.Resolve <IValidateAsyncObject>();
            validate.Child = child;
        }
示例#6
0
        public void TestInitailize()
        {
            scope       = AutofacContainer.GetLifetimeScope().Resolve <IServiceScope>();
            target      = scope.Resolve <IValidateObjectList>();
            target.ID   = Id;
            target.Name = Name;
            resolver    = scope.Resolve <FatClientContractResolver>();

            child      = scope.Resolve <IValidateObject>();
            child.ID   = Guid.NewGuid();
            child.Name = Guid.NewGuid().ToString();
            target.Add(child);
        }
示例#7
0
        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);
        }
示例#8
0
        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();
        }
示例#10
0
 public void TestInitialize()
 {
     scope  = AutofacContainer.GetLifetimeScope();
     single = scope.Resolve <IBaseObject>();
 }
示例#11
0
 public void TestInitialize()
 {
     scope = AutofacContainer.GetLifetimeScope(true);
 }
 public void TestInitialize()
 {
     scope  = AutofacContainer.GetLifetimeScope(true);
     portal = scope.Resolve <IReceivePortal <IBaseAuthorizationGrantedObject> >();
 }
示例#13
0
 public void TestInitailize()
 {
     scope    = AutofacContainer.GetLifetimeScope();
     validate = scope.Resolve <IValidateDependencyRules>();
 }
 public void TestInitailize()
 {
     scope  = AutofacContainer.GetLifetimeScope();
     target = scope.Resolve <ISharedAsyncRuleObject>();
 }