Exemplo n.º 1
0
        public async Task Can_Set_ContactPerson(OrganizationRole role)
        {
            //Arrange
            var login = await HttpApi.GetCookieAsync(role);

            const int organizationId   = TestEnvironment.DefaultOrganizationId;
            var       contactPersonDto = await OrganizationHelper.GetContactPersonAsync(organizationId);

            var name     = A <string>();
            var lastName = A <string>();
            var email    = A <string>();
            var phone    = A <string>();

            //Act - perform the action with the actual role
            var result = await OrganizationHelper.ChangeContactPersonAsync(contactPersonDto.Id, organizationId, name, lastName, email, phone, login);

            //Assert
            Assert.Equal(contactPersonDto.Id, result.Id);
            Assert.Equal(email, result.Email);
            Assert.Equal(name, result.Name);
            Assert.Equal(lastName, result.LastName);
            Assert.Equal(phone, result.PhoneNumber);
            Assert.Equal(organizationId, result.OrganizationId);
        }