public void Test_GetSizeDefenseModifier_BySizeID_BadResult() { int SizeID = 0; SizeDefenseModifier objSizeDefenseModifier = new SizeDefenseModifier(); objSizeDefenseModifier.GetSizeDefenseModifier(SizeID); Assert.IsTrue(objSizeDefenseModifier.SizeID == 0 && objSizeDefenseModifier.ModifierID == 0 && objSizeDefenseModifier.DefenseTypeID == 0); }
public void Test_GetSizeDefenseModifier_BySizeID_GoodResult() { int SizeID = 2; SizeDefenseModifier objSizeDefenseModifier = new SizeDefenseModifier(); objSizeDefenseModifier.GetSizeDefenseModifier(SizeID); Assert.AreEqual(SizeID, objSizeDefenseModifier.SizeID); }
public void Test_GetSizeDefenseModifiers_WithOutOrderBy_NoResult() { string strWhere = "SizeID=4"; string strOrderBy = ""; SizeDefenseModifier objSizeDefenseModifier = new SizeDefenseModifier(); List <SizeDefenseModifier> lstSizeDefenseModifiers = new List <SizeDefenseModifier>(); lstSizeDefenseModifiers = objSizeDefenseModifier.GetSizeDefenseModifiers(strWhere, strOrderBy); Assert.IsTrue(lstSizeDefenseModifiers.Count == 0); }
public void Test_GetSizeDefenseModifiers_WithOrderBy_GoodResult() { string strWhere = "SizeID IN (1,2)"; string strOrderBy = "SizeID"; SizeDefenseModifier objSizeDefenseModifier = new SizeDefenseModifier(); List <SizeDefenseModifier> lstSizeDefenseModifiers = new List <SizeDefenseModifier>(); lstSizeDefenseModifiers = objSizeDefenseModifier.GetSizeDefenseModifiers(strWhere, strOrderBy); Assert.IsTrue(lstSizeDefenseModifiers.Count > 0); }
public void Test_SaveAndDeleteSizeDefenseModifier() { bool returnVal; objNewSizeDefenseModifier.SaveSizeDefenseModifier(); SizeDefenseModifier objSDM = new SizeDefenseModifier(); objSDM.GetSizeDefenseModifier(objNewSizeDefenseModifier.SizeID); Assert.IsTrue(objNewSizeDefenseModifier.ModifierID == objSDM.ModifierID); returnVal = objNewSizeDefenseModifier.DeleteSizeDefenseModifier(); Assert.IsTrue(returnVal && objNewSizeDefenseModifier.DeleteOK); }