public void WhenCalledWithValidExternalUri_Succeeds()
        {
            var logger = new PsCmdletLoggerDouble();
            var initializer = new CourierWebServiceInitializer("http://www.w3schools.com/webservices/tempconvert.asmx", logger);

            initializer.WarmUpWebService();

            Assert.That(logger.ExceptionsLogged.Equals(0));
        }
        public void WhenCalledWithInvalidUri_FailsAndLogs()
        {
            var logger = new PsCmdletLoggerDouble();
            var initializer = new CourierWebServiceInitializer("Invalid Uri", logger);

            initializer.WarmUpWebService();

            Assert.That(logger.ExceptionsLogged.Equals(1));
        }
        public void WhenCalledWithValidCourierUri_Succeeds()
        {
            var logger = new PsCmdletLoggerDouble();
            var initializer = new CourierWebServiceInitializer("http://courier.MILKBooksWebsite.eid.co.nz.local:8080/umbraco/plugins/courier/webservices/Repository.asmx", logger);

            initializer.WarmUpWebService();

            Assert.That(logger.ExceptionsLogged.Equals(0));
        }
 protected override void ProcessRecord()
 {
     try
     {
         var initializer = new CourierWebServiceInitializer(CourierWebServiceUrl, new PsCmdletLogger(this));
         initializer.WarmUpWebService();
     }
     catch (Exception e)
     {
         ThrowTerminatingError(
             new ErrorRecord(
                 e,
                 "UmbracoResources",
                 ErrorCategory.NotSpecified,
                 this
                 )
             );
     }
 }