예제 #1
0
        public async Task CannotDeleteUser()
        {
            string currentUserId  = "1";
            string UserIdToDelete = "9";
            var    result         = await service.DeleteUser(currentUserId, UserIdToDelete);

            var excpected = new OperationDetails(false, "Cannot delete user. Something happens", "");

            Assert.IsTrue(excpected.Equals(result));
        }
예제 #2
0
        public async Task CannotDeleteYourSelfUser()
        {
            string currentUserId  = "1";
            string UserIdToDelete = "1";
            var    result         = await service.DeleteUser(currentUserId, UserIdToDelete);

            var excpected = new OperationDetails(true, "Cannot delete youself", "");

            Assert.IsTrue(excpected.Equals(result));
        }
예제 #3
0
        public async Task CanDeleteUser()
        {
            string currentUserId  = "1";
            string UserIdToDelete = "2";
            var    result         = await service.DeleteUser(currentUserId, UserIdToDelete);

            var excpected = new OperationDetails(true, "user was deleted", "");

            // need to add Equals into OperationDetails or ?
            Assert.IsTrue(excpected.Equals(result));
        }