public void AccessRequest_User_Constructor() { // Arrange var user = new PimsUser(); var role = new PimsRole(); var status = new PimsAccessRequestStatusType(); // Act var accessRequest = new PimsAccessRequest(user, role, status); // Assert accessRequest.User.Should().Be(user); accessRequest.Role.Should().Be(role); accessRequest.AccessRequestStatusTypeCodeNavigation.Should().Be(status); accessRequest.GetOrganizations().Should().BeEmpty(); }
public void Paged_CopyTo() { // Arrange var items = new[] { EntityHelper.CreateUser("one"), EntityHelper.CreateUser("two") }; var page = 2; var quantity = 4; var total = 6; var paged = new Paged <PimsUser>(items, page, quantity, total); var result = new PimsUser[3]; // Act paged.CopyTo(result, 1); // Assert result.Count().Should().Be(3); result[0].Should().BeNull(); result[1].Should().BeEquivalentTo(items[0]); result[2].Should().BeEquivalentTo(items[1]); }