public void ActivityExists() { var context = ServiceProvider.GetService<AllReadyContext>(); var query = new ActivityDetailQuery { ActivityId = 1 }; var handler = new ActivityDetailQueryHandler(context); var result = handler.Handle(query); Assert.NotNull(result); }
public void ActivityDoesNotExist() { var context = ServiceProvider.GetService <AllReadyContext>(); var query = new ActivityDetailQuery(); var handler = new ActivityDetailQueryHandler(context); var result = handler.Handle(query); Assert.Null(result); }
public async Task ActivityExists() { var context = ServiceProvider.GetService <AllReadyContext>(); var query = new ActivityDetailQuery { ActivityId = 1 }; var handler = new ActivityDetailQueryHandler(context); var result = await handler.Handle(query); Assert.NotNull(result); }
public async Task ActivityIncludesAllLocationInformation() { var context = ServiceProvider.GetService <AllReadyContext>(); var query = new ActivityDetailQuery { ActivityId = 1 }; var handler = new ActivityDetailQueryHandler(context); var result = await handler.Handle(query); Assert.NotNull(result.Location); Assert.NotNull(result.Location?.Id); Assert.NotNull(result.Location?.Address1); Assert.NotNull(result.Location?.Address2); Assert.NotNull(result.Location?.PostalCode); Assert.NotNull(result.Location?.State); Assert.NotNull(result.Location?.Name); Assert.NotNull(result.Location?.PhoneNumber); Assert.NotNull(result.Location?.Country); }
public void ActivityIncludesAllLocationInformation() { var context = ServiceProvider.GetService<AllReadyContext>(); var query = new ActivityDetailQuery() { ActivityId = 1 }; var handler = new ActivityDetailQueryHandler(context); var result = handler.Handle(query); Assert.NotNull(result.Location); Assert.NotNull(result.Location?.Id); Assert.NotNull(result.Location?.Address1); Assert.NotNull(result.Location?.Address2); Assert.NotNull(result.Location?.PostalCode); Assert.NotNull(result.Location?.State); Assert.NotNull(result.Location?.Name); Assert.NotNull(result.Location?.PhoneNumber); Assert.NotNull(result.Location?.Country); }