public void ListData_Test() { using (var trans = TransHelper.NewScope()) { // arrange var expectedList = new List <LaporanDinasModel> { LaporanDinasTestData() }; var expected = LaporanDinasTestData(); _sut.Insert(expected); var tgl1 = DateTime.Parse("2020-05-01"); var tgl2 = DateTime.Parse("2020-05-31"); // act var actual = _sut.ListData(tgl1, tgl2); // assert actual.Should().BeEquivalentTo(expectedList); } }
public IEnumerable <LaporanDinasModel> ListData(DateTime tgl1, DateTime tgl2) { var result = _laporanDinasDal.ListData(tgl1, tgl2); return(result); }