Exemple #1
0
        public async Task ReturnFalseIfDeactivateUserAdminPrivilegesFails()
        {
            // Arrange

            // Act
            var result = await sutAppRepoFailure
                         .DeactivateAdminPrivileges(1, 3);

            // Assert
            Assert.That(result, Is.InstanceOf <UserResult>());
            Assert.That(result.Success, Is.False);
            Assert.That(result.Message, Is.EqualTo("App not Found"));
            Assert.That(result.User, Is.TypeOf <User>());
        }
Exemple #2
0
        public async Task DeactivateUserAdminPrivileges()
        {
            // Arrange

            // Act
            var result = await sut
                         .DeactivateAdminPrivileges(1, 3);

            // Assert
            Assert.That(result, Is.InstanceOf <UserResult>());
            Assert.That(result.Success, Is.True);
            Assert.That(result.Message, Is.EqualTo("Admin Privileges Deactivated"));
            Assert.That(result.User, Is.TypeOf <User>());
        }