public async Task GenerateBookSlipTest() { try { var controller = new PaymentController(); Payment payment = new Payment { PaymentOptionId = 2, IsPaid = true, Status = 'P', PaidDate = DateTime.Now, PaidAmount = 200 }; SlipDeatils slipDeatils = new SlipDeatils { SlipAddress = "aaa", ContactNumber = "2233" }; int moduleId = 2; var result = await controller.GenerateBookSlip(moduleId, payment, slipDeatils); Assert.Equal(result.Value, true); Assert.NotEqual(result.Value, true); } catch (Exception ex) { Assert.NotNull(ex); } }