示例#1
0
        public void CityApiSuccess()
        {
            //Arrange
            City       city;
            CityCaller cityCaller = new CityCaller("https://dawa.aws.dk");

            //Act
            city = cityCaller.GetByZipCode("7470").Result;

            //Assert
            Assert.AreEqual("Karup J", city.CityName);
        }
示例#2
0
        public void CityApiFail()
        {
            //Arrange
            City city = null;
            bool res  = false;

            CityCaller cityCaller = new CityCaller("https://dawa.aws.dk");

            //Act
            try
            {
                city = cityCaller.GetByZipCode("1234").Result;
            }
            catch
            {
                res = true;
            }

            //Assert
            Assert.IsNull(city);
            Assert.AreEqual(true, res);
        }
示例#3
0
 public ViewModelCreateCustomer()
 {
     customer       = new Customer(this);
     cityCaller     = new CityCaller();
     customerCaller = new CustomerCaller();
 }