public void assign_a_given_id_setter_is_private() { var member = ReflectionHelper.GetProperty <UserWithPrivateId>(x => x.Id); var theAssigner = new IdAssigner <UserWithPrivateId, Guid>(member, new GuidIdGeneration()); var user = new UserWithPrivateId(); var id = Guid.NewGuid(); theAssigner.Assign(null, user, id); user.Id.ShouldBe(id); }
public void assign_a_given_id_setter_is_private() { var member = ReflectionHelper.GetProperty<UserWithPrivateId>(x => x.Id); var theAssigner = new IdAssigner<UserWithPrivateId, Guid>(member, new GuidIdGeneration(), null); var user = new UserWithPrivateId(); var id = Guid.NewGuid(); theAssigner.Assign(user, id); user.Id.ShouldBe(id); }
public IdAssignerTests() { var member = ReflectionHelper.GetProperty <User>(x => x.Id); theAssigner = new IdAssigner <User, Guid>(member, new GuidIdGeneration()); }
public IdAssignerTests() { var member = ReflectionHelper.GetProperty<User>(x => x.Id); theAssigner = new IdAssigner<User, Guid>(member, new GuidIdGeneration(), null); }