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(); } }
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(); } }
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(); } }
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(); } }