コード例 #1
0
 public void GetCatalogueWithNoTags()
 {
     using (var domain = new WebServicesActivityDomain())
     {
         Feature.WithScenario("get the catalogue with no tags")
             .Tag("Catalogue")
             .Given(domain.TheDefaultConfigurationManagerIsLoaded)
                 .And(domain.TheWebServiceActivityIsLoaded)
                 .And(domain.TheAgentIsStarted)
             .When(domain.TheWebServiceGetCatalogueApiIsCalled)
             .Then(domain.TheWebServiceCatalogueShouldBeValid)
             .ExecuteWithReport();
     }
 }
コード例 #2
0
 public void GetCatalogueWithNoTags()
 {
     using (var domain = new WebServicesActivityDomain())
     {
         Feature.WithScenario("get the catalogue with no tags")
         .Tag("Catalogue")
         .Given(domain.TheDefaultConfigurationManagerIsLoaded)
         .And(domain.TheWebServiceActivityIsLoaded)
         .And(domain.TheAgentIsStarted)
         .When(domain.TheWebServiceGetCatalogueApiIsCalled)
         .Then(domain.TheWebServiceCatalogueShouldBeValid)
         .ExecuteWithReport();
     }
 }
コード例 #3
0
 public void PingStatusPage()
 {
     using (var domain = new WebServicesActivityDomain())
     {
         Feature.WithScenario("calling the status api method")
             .Tag("Status")
             .Given(domain.TheDefaultConfigurationManagerIsLoaded)
                 .And(domain.TheWebServiceActivityIsLoaded)
                 .And(domain.TheAgentIsStarted)
             .When(domain.TheWebServiceStatusApiIsCalled)
             .Then(domain.TheWebServiceStatusShouldBeValid)
                 .And(domain.ThrewNoException)
             .ExecuteWithReport();
     }
 }
コード例 #4
0
 public void PingStatusPage()
 {
     using (var domain = new WebServicesActivityDomain())
     {
         Feature.WithScenario("calling the status api method")
         .Tag("Status")
         .Given(domain.TheDefaultConfigurationManagerIsLoaded)
         .And(domain.TheWebServiceActivityIsLoaded)
         .And(domain.TheAgentIsStarted)
         .When(domain.TheWebServiceStatusApiIsCalled)
         .Then(domain.TheWebServiceStatusShouldBeValid)
         .And(domain.ThrewNoException)
         .ExecuteWithReport();
     }
 }
コード例 #5
0
 public void PingStatusPageWithNonMatchingApiKey()
 {
     using (var domain = new WebServicesActivityDomain())
     {
         Feature.WithScenario("calling the status api method with a mis-matched apikey")
         .Tag("Status")
         .Given(domain.TheDefaultConfigurationManagerIsLoaded)
         .And(domain.TheWebServiceClientApiKeyIs, "hello")
         .And(domain.TheWebServiceActivityApiKeyIs, "goodbye")
         .And(domain.TheWebServiceActivityIsLoaded)
         .And(domain.TheAgentIsStarted)
         .When(domain.TheWebServiceStatusApiIsCalled)
         .Then(domain.ShouldThrow_Exception, typeof(CommunicationException))
         .ExecuteWithReport();
     }
 }
コード例 #6
0
        public void NotificationPublishedToTheWebService()
        {
            using (var domain = new WebServicesActivityDomain())
            {
                var id = Guid.NewGuid();

                Feature.WithScenario("publishing a message")
                    .Tag("Publishing")
                    .Given(domain.TheDefaultConfigurationManagerIsLoaded)
                        .And(domain.TheWebServiceActivityIsLoaded)
                        .And(domain.TheWebServicePublisherClientActivityIsLoaded)
                        .And(domain.TheAgentIsStarted)
                    .When(domain.ANotificationIsSentWithId_, id)
                    .Then(domain.TheWebServiceShouldHaveReceivedMessage_, id)
                    .ExecuteWithReport();
            }
        }
コード例 #7
0
        public void NotificationPublishedToTheWebService()
        {
            using (var domain = new WebServicesActivityDomain())
            {
                var id = Guid.NewGuid();

                Feature.WithScenario("publishing a message")
                .Tag("Publishing")
                .Given(domain.TheDefaultConfigurationManagerIsLoaded)
                .And(domain.TheWebServiceActivityIsLoaded)
                .And(domain.TheWebServicePublisherClientActivityIsLoaded)
                .And(domain.TheAgentIsStarted)
                .When(domain.ANotificationIsSentWithId_, id)
                .Then(domain.TheWebServiceShouldHaveReceivedMessage_, id)
                .ExecuteWithReport();
            }
        }
コード例 #8
0
 public void PingStatusPageWithNonMatchingApiKey()
 {
     using (var domain = new WebServicesActivityDomain())
     {
         Feature.WithScenario("calling the status api method with a mis-matched apikey")
             .Tag("Status")
             .Given(domain.TheDefaultConfigurationManagerIsLoaded)
                 .And(domain.TheWebServiceClientApiKeyIs, "hello")
                 .And(domain.TheWebServiceActivityApiKeyIs, "goodbye")
                 .And(domain.TheWebServiceActivityIsLoaded)
                 .And(domain.TheAgentIsStarted)
             .When(domain.TheWebServiceStatusApiIsCalled)
             .Then(domain.ShouldThrow_Exception, typeof(CommunicationException))
             .ExecuteWithReport();
     }
 }