Esempio n. 1
0
        public async Task Should_Success_PRUnApprove_Data()
        {
            GarmentPurchaseRequestFacade facade = new GarmentPurchaseRequestFacade(ServiceProvider, _dbContext(GetCurrentMethod()));
            var model = await this.dataUtil(facade, GetCurrentMethod()).GetTestData();

            var Response = await facade.PRUnApprove(model.Id, USERNAME);

            Assert.NotEqual(Response, 0);
        }
Esempio n. 2
0
        public async Task Should_Error_PRUnApprove_Data()
        {
            GarmentPurchaseRequestFacade facade = new GarmentPurchaseRequestFacade(ServiceProvider, _dbContext(GetCurrentMethod()));

            Exception errorInvalidId = await Assert.ThrowsAsync <Exception>(async() => await facade.PRUnApprove(0, USERNAME));

            Assert.NotNull(errorInvalidId.Message);
        }