public DictionaryProducts() { var filePath = ProductsProvider.GetDbPath(); var obj = new ProductsProvider(filePath); DictionaryOfProducts = obj.GetAllProductsFromDb(); }
public void CheckDatabaseFilePath() { var filePath = ProductsProvider.GetDbPath(); var fileExistsInPath = File.Exists(filePath); Assert.True(fileExistsInPath.Equals(true)); }
public void WhenCorrectAddressIsPassedThenCreateDbObject() { var filePath = ProductsProvider.GetDbPath(); var productsProvider = new ProductsProvider(filePath); Assert.False(productsProvider.DbConnection.Equals(null)); }
public void WhenCorrectDatabaseFilePathPassedCreateProductObject() { var filePath = ProductsProvider.GetDbPath(); var productsProvider = new ProductsProvider(filePath); Assert.True(!productsProvider.Equals(null)); }
public void GetAllProductsFromDatabaseWhenCorrectFilePathIsPassed() { var filePath = ProductsProvider.GetDbPath(); var products = new ProductsProvider(filePath); var allProducts = products.GetAllProductsFromDb(); Assert.True(allProducts.Count != 0); }