public void SumUnitTest() { SearchWindowModel swm = new SearchWindowModel("*", "*", "*", "*", "1850", "*", "*"); int numOfUnits = swm.CalculateUnitSum(); Assert.AreEqual(132, numOfUnits); }
public void CanCapcityError(string searchTerm) { SearchWindowModel swm = new SearchWindowModel(); bool query = swm.IsValidQuery(searchTerm); Assert.IsFalse(query); }
public SearchWindow(SearchProxy search) { InitializeComponent(); DataContext = model = new SearchWindowModel(search); CreateResultWindow(search.Term); }
public void CanCapacityTest() { SearchWindowModel swm = new SearchWindowModel("*", "*", "*", "*", "1706", "*", "*"); List <SearchResult> results = swm.RetrieveCanList(out int x); int numOfCanes = swm.CalculateCanList(results, 10); Assert.AreEqual(28, numOfCanes); }
public void CanCapacityRangeTest(string serachTerm, int ExpectedTotal) { SearchWindowModel swm = new SearchWindowModel("*", "*", "*", "*", serachTerm, "*", "*"); int numOfCans; List <SearchResult> results = swm.RetrieveCanList(out numOfCans); int numOfCanes = swm.CalculateCanList(results, 10); Assert.AreEqual(ExpectedTotal, numOfCanes); }