コード例 #1
0
 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);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 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);
 }