Ejemplo n.º 1
0
        public void TestCurrencyConverterDKK()
        {
            Facade facade = new Facade();
            double rate = facade.GetCurrencyConverter().GetCurrencyRate("DKK");
            Prices expectedPrice = new Prices()
            {
                BeachTowels = 5 * rate,
                FinalCleaning = 80 * rate,
                LinenAndTowels = 12 * rate,
                LowSeason = 530 * rate,
                MidSeason = 695 * rate,
                HighSeason = 895 * rate
            };

            Prices testPrice = new Prices()
            {
                Id = 1,
                BeachTowels = 5,
                FinalCleaning = 80,
                LinenAndTowels = 12,
                LowSeason = 530,
                MidSeason = 695,
                HighSeason = 895
            };

            Prices expectedResult = expectedPrice;
            Prices testResult = facade.GetCurrencyConverter().GetConvertedCurrency(testPrice, "DKK");
            Assert.AreEqual(true, ComparePriceChecker(expectedResult, testResult));
        }
Ejemplo n.º 2
0
        public void LoginTester()
        {
            User user = new User() { Email = "*****@*****.**", Password = "******" };
            Facade facade = new Facade();
            bool expectedResult = true;
            bool testRestult = facade.GetLoginChecker().CheckCredentials(user);

            Assert.AreEqual(expectedResult, testRestult);
        }
Ejemplo n.º 3
0
 public ActionResult Torrox()
 {
     Facade facade = new Facade();
     IEnumerable<Apartment> listOfTorroxApartments = facade.GetApartmentFilter().GetAllTorroxApartments();
     return View(listOfTorroxApartments);
 }
Ejemplo n.º 4
0
 public ActionResult Marbella()
 {
     Facade facade = new Facade();
     IEnumerable<Apartment> listOfMarbellaApartments = facade.GetApartmentFilter().GetAllMarbellaApartments();
     return View(listOfMarbellaApartments);
 }
Ejemplo n.º 5
0
 public void TestGetRateUSD()
 {
     double expectedResult = 1.0841;
     double testResult = new Facade().GetCurrencyConverter().GetCurrencyRate("USD");
     Assert.AreEqual(expectedResult, testResult);
 }
Ejemplo n.º 6
0
 public void TestGetRateDKK()
 {
     double expectedResult = 7.4612;
     double testResult = new Facade().GetCurrencyConverter().GetCurrencyRate("DKK");
     Assert.AreEqual(expectedResult, testResult);
 }