public async Task CreateUserWithOutCompanyRole()
        {
            using var helper = await new SimpleTestHelperBuilderCompanyUser().Build();
            var uri = $"api/companies/{helper.Company.Id}/users";

            PropertyUserLoginDTO user = GetUser("Phillip", "Schmidt", "Test123456", new List <RoleDTO>()
            {
                new RoleDTO()
                {
                    Name = "Mitarbeiter"
                }
            });

            var response = await helper.client.PostAsync(uri, user.ToStringContent());

            var newUser = await response.Content.Parse <PropertyUserDTO>();

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);

            var uriUser = $"api/companies/{helper.Company.Id}/users/{newUser.User.Id}";

            response = await helper.client.GetAsync(uriUser);

            var exists = await response.Content.Parse <PropertyUserDTO>() != null;

            Assert.IsTrue(exists);

            var signInNewUser = await SignIn(helper.client, newUser.User.Username, "Test123456");

            helper.client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", signInNewUser.Token);

            response = await helper.client.PostAsync(uri, user.ToStringContent());

            Assert.IsFalse(response.IsSuccessStatusCode);
        }
        public async Task CreateUserTrue()
        {
            using var helper = await new SimpleTestHelperBuilderCompanyUser().Build();
            var uri = $"api/companies/{helper.Company.Id}/users";

            PropertyUserLoginDTO user = GetUser("Phillip", "Schmidt", "Test123456", new List <RoleDTO>()
            {
                new RoleDTO()
                {
                    Name = "Mitarbeiter"
                }
            });

            var response = await helper.client.PostAsync(uri, user.ToStringContent());

            var newUser = await response.Content.Parse <PropertyUserDTO>();

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);

            var uriUser = $"api/companies/{helper.Company.Id}/users/{newUser.User.Id}";

            response = await helper.client.GetAsync(uriUser);

            var exists = await response.Content.Parse <PropertyUserDTO>() != null;

            Assert.IsTrue(exists);
        }
        public async Task CreateUserFirstNameFalse()
        {
            using var helper = await new SimpleTestHelperBuilderCompanyUser().Build();

            var uri = $"api/companies/{helper.Company.Id}/users";

            PropertyUserLoginDTO user = GetUser(" ", "Schmidt", "Test123456", new List <RoleDTO>()
            {
                new RoleDTO()
                {
                    Name = "Mitarbeiter"
                }
            });
            var response = await helper.client.PostAsync(uri, user.ToStringContent());

            Assert.IsFalse(response.IsSuccessStatusCode);
        }