Beispiel #1
0
        public void Create_new_user()
        {
            NewUserDto newUserDto = new NewUserDto
            {
                Name     = "Robert",
                Surname  = "Martin",
                Username = "******",
                Password = "******",
                Email    = "*****@*****.**",
                IsRoot   = false
            };
            NewUserIdDto newUserIdDto = _managementController.CreateUser(newUserDto);

            Assert.IsNotNull(newUserIdDto);
            UserInfoDto userInfoDto = _managementController.GetUser(newUserIdDto.Id);

            Assert.IsNotNull(userInfoDto);
            Assert.AreEqual(newUserDto.Name, userInfoDto.Name);
            Assert.AreEqual(newUserDto.Surname, userInfoDto.Surname);
            Assert.AreEqual(newUserDto.Username, userInfoDto.Username);
            Assert.AreEqual(newUserDto.Email, userInfoDto.Email);
            Assert.AreEqual(newUserDto.IsRoot, userInfoDto.IsRoot);
        }