public void ModifyStore_1() { int ExpectedOutput = 1; int GotOutput = 0; CRUDTemplate <IStores> StoresTemplateObj = new StoresTemplate(); Stores StoresObj = new Stores(); StoresObj.SetStoreID(7); StoresObj.SetStoreName("Walmart_Test"); StoresObj.SetStoreLogo("images\\walmart_test.png"); try { GotOutput = StoresTemplateObj.Update(StoresObj); } catch (Exception) { GotOutput = -2; } Assert.AreEqual(ExpectedOutput, GotOutput); // Modfying Store to its original values StoresObj.SetStoreID(7); StoresObj.SetStoreName("Walmart"); StoresObj.SetStoreLogo("images\\walmart.png"); StoresTemplateObj.Update(StoresObj); }
public void ModifyStore_4() { int ExpectedOutput = -2; int GotOutput = -1; CRUDTemplate <IStores> StoresTemplateObj = new StoresTemplate(); Stores StoresObj = new Stores(); StoresObj.SetStoreID(7); StoresObj.SetStoreName(null); StoresObj.SetStoreLogo("images\\walmart_test.png"); try { GotOutput = StoresTemplateObj.Update(StoresObj); } catch (Exception) { GotOutput = -2; } Assert.AreEqual(ExpectedOutput, GotOutput); }