Inheritance: UserProperties
        public void Insert_and_remove_user(string username, string password, string email,
            string departmentId, string groupId, string firstName, string lastName, string languageCode)
        {
            var newUser = new CreateUserDto
            {
                Email = email,
                FirstName = firstName,
                LastName = lastName,
                DepartmentId = departmentId,
                GroupId = groupId,
                Password = password,
                Username = username,
                PhoneMobile = "070-123 45 67",
                PhoneRegular = "+46 31 123 45 67",
                LanguageCode = languageCode
            };
            // Guard if test fails half way
            var stratsysApiMetadata = Api.Users.Get(username).Fetch();
            if (stratsysApiMetadata.Success)
            {
                var b = Api.Users.Delete(username).Fetch();
            }
            var metadata = Api.Users.Create(newUser).Fetch();
            Assert.That(metadata.Message, Is.Null);
            Assert.That(metadata.Success);
            var id = metadata.Result;
            var metadata2 = Api.Users.Get(id).Fetch();
            Assert.That(metadata2.Message, Is.Null);
            Assert.That(metadata2.Success);
            var result = metadata2.Result;
            Assert.That(result.Username, Is.EqualTo(newUser.Username));
            Assert.That(result.Email, Is.EqualTo(newUser.Email));
            Assert.That(result.FirstName, Is.EqualTo(newUser.FirstName));
            Assert.That(result.LastName, Is.EqualTo(newUser.LastName));
            Assert.That(result.DepartmentId, Is.EqualTo(newUser.DepartmentId));
            Assert.That(result.GroupId, Is.EqualTo(newUser.GroupId));
            Assert.That(result.PhoneMobile, Is.EqualTo(newUser.PhoneMobile));
            Assert.That(result.PhoneRegular, Is.EqualTo(newUser.PhoneRegular));
            Assert.That(result.LanguageCode, Is.EqualTo(newUser.LanguageCode));

            Api.Users.Delete(username).Fetch();
        }
 public CreateUserRequest Create(CreateUserDto user)
 {
     return new CreateUserRequest(m_service, user);
 }