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

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

            Assert.NotEqual(Response, 0);
        }
Exemple #2
0
        public async Task Should_Error_PRApprove_Data()
        {
            GarmentPurchaseRequestFacade facade = new GarmentPurchaseRequestFacade(ServiceProvider, _dbContext(GetCurrentMethod()));
            var model = await this.dataUtil(facade, GetCurrentMethod()).GetTestData();

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

            Assert.NotNull(errorInvalidId.Message);
        }