Esempio n. 1
0
        public void CancelDelegation_Valid()
        {
            // Arrange
            delegationService.DelegateManagerRole("*****@*****.**", "*****@*****.**", "Sat Jul 28 00:00:00 GMT + 08:00 2018", "Sun Jul 29 00:00:00 GMT+08:00 2018");

            // Act
            var latestDelegation = delegationService.FindAllDelegations().OrderByDescending(d => d.DelegationId).FirstOrDefault();

            delegationService.CancelDelegation(latestDelegation.DelegationId, "*****@*****.**");

            // Assert
            Assert.AreEqual(3, latestDelegation.Status.StatusId);
            Assert.AreEqual("*****@*****.**", latestDelegation.UpdatedBy.Email);
        }