public async Task Should_Success_CreateAsync()
        {
            CreditorAccountService service = new CreditorAccountService(GetServiceProvider().Object, _dbContext(GetCurrentMethod()));
            var data = _dataUtil(service).GetNewData_CreditorAccountModel();

            var result = await service.CreateAsync(data);

            Assert.NotEqual(0, result);
        }
Example #2
0
        public async Task <CreditorAccountModel> GetTestData_CreditorAccountModel()
        {
            var data = GetNewData_CreditorAccountModel();
            await Service.CreateAsync(data);

            var result = Service.ReadModelById(data.Id);

            return(await result);
        }
        public async Task Should_Success_Put_UnitPaymentOrderCorrection()
        {
            CreditorAccountService service = new CreditorAccountService(GetServiceProvider().Object, _dbContext(GetCurrentMethod()));
            var data = _dataUtil(service).GetNewData_CreditorAccountModel();

            await service.CreateAsync(data);

            var updateResponse = await service.CreateFromUnitPaymentCorrection(new CreditorAccountUnitPaymentCorrectionPostedViewModel()
            {
                UnitReceiptNoteNo = data.UnitReceiptNoteNo
            });

            Assert.NotEqual(0, updateResponse);
        }