private IEnumerable <BiayaModel> Proses() { var tgl1 = dateTimePicker1.Value.ToString("dd-MM-yyyy"); var tgl2 = dateTimePicker2.Value.ToString("dd-MM-yyyy"); var listData = _biayaDal.ListData(tgl1, tgl2); if (listData == null) { return(null); } return(listData); }
public void ListDataTest() { using (var trans = TransHelper.NewScope()) { // arrange var expected1 = BiayaDataFactory(); _biayaDal.Insert(expected1); var expected2 = expected1.CloneObject(); expected2.BiayaID = "A2"; _biayaDal.Insert(expected2); var expected = new List <BiayaModel> { expected1, expected2 }; // act var actual = _biayaDal.ListData(expected1.Tgl, expected1.Tgl); // assert actual.Should().BeEquivalentTo(expected); } }
public IEnumerable <BiayaModel> ListData(string tgl1, string tgl2) { return(_biayaDal.ListData(tgl1, tgl2)); }