Beispiel #1
0
        private void btnFindProduct_Click(object sender, RoutedEventArgs e)
        {
            string product = tbxFindProduct.Text;
            var    store   = User.FindCheapestStore(product);

            if (store != null)
            {
                lblFindProduct.Content = store.StoreName;
            }
            else
            {
                lblFindProduct.Content = "Vare findes ikke";
            }
        }
Beispiel #2
0
        public void FindCheapestStore_FindCheapestStoreForBananButBananIsNotInDb_ReturnNull()
        {
            _unitWork.Products.FindProduct(_product.ProductName).Returns((Product)null);

            Assert.That(_uut.FindCheapestStore(_product.ProductName), Is.EqualTo(null));
        }
Beispiel #3
0
 public void FindCheapestStore_AppleIsNotInTheDatabase_ReturnNull()
 {
     Assert.That(_uut.FindCheapestStore("Apple"), Is.EqualTo(null));
 }