Example #1
0
        public void GetVersion()
        {
            var client  = new CustomerApiConsumer("http://localhost:8080");
            var version = client.GetVersion();

            Assert.Equal("1.2.3.4", version.Build);
        }
Example #2
0
        public void GettingVersion()
        {
            //Given
            PactDefinitions.GetVersion.CreateOn(this.mockProviderService);
            var consumer = new CustomerApiConsumer(this.mockProviderServiceBaseUri);

            //When
            var result = consumer.GetVersion();

            //Then
            Assert.Equal("1.2.3.4", result.Build);
            Assert.Equal("09/17/2015 20:29:13", result.Date.ToString(CultureInfo.InvariantCulture));
            this.mockProviderService.VerifyInteractions(); //NOTE: Verifies that interactions registered on the mock provider are called once and only once
        }
 public void GetVersion()
 {
     var client = new CustomerApiConsumer("http://localhost:8080");
     var version = client.GetVersion();
     Assert.Equal("1.2.3.4", version.Build);
 }