public void TestGetScheduleDetailQuery_NoData() { var cmd = new GetScheduleDetailQueryHandler(db); var qry = new GetScheduleDetailQuery { Id = 1 }; var cancel = new CancellationToken(); var cqrsResult = cmd.Handle(qry, cancel); Assert.ThrowsException <AggregateException>(() => cqrsResult.Result); }
public void TestGetScheduleDetailQuery_WithData() { var cmd = new GetScheduleDetailQueryHandler(db); var qry = new GetScheduleDetailQuery { Id = 1 }; var cancel = new CancellationToken(); var cqrsResult = cmd.Handle(qry, cancel); Assert.IsTrue(cqrsResult.Result.ScheduleId == 1); }