public void HavePartyWorks() { CigarParty cigarParty = new CigarParty(); const int MinimumCigarCount = 40; const int MaximumCigarCount = 60; int cigars1 = 20; // should return false bool isWeekend1 = false; bool result1 = cigarParty.HaveParty(cigars1, isWeekend1); int cigars2 = 50; // should return true bool isWeekend2 = false; bool result2 = cigarParty.HaveParty(cigars2, isWeekend2); int cigars3 = 70; // should return false bool isWeekend3 = false; bool result3 = cigarParty.HaveParty(cigars3, isWeekend3); int cigars4 = 80; // should return true bool isWeekend4 = true; bool result4 = cigarParty.HaveParty(cigars4, isWeekend4); int cigars5 = 25; // should return false bool isWeekend5 = true; bool result5 = cigarParty.HaveParty(cigars5, isWeekend5); Assert.IsFalse(result1, $"Cigars is less than {MinimumCigarCount}, result should be false."); Assert.IsTrue(result2, $"Cigars is between {MinimumCigarCount} and {MaximumCigarCount}, result should be true."); Assert.IsFalse(result3, $"Cigars is more than {MaximumCigarCount} and it is not a weekend, result should be false."); Assert.IsTrue(result4, $"Cigars is over {MaximumCigarCount}, but weekend is true, result should be true."); Assert.IsFalse(result5, $"Cigars is less than {MinimumCigarCount}, result should be false."); }
public void CigarPartyTest30False() { bool result = thisCigarParty.HaveParty(30, false); bool expectedResult = false; Assert.AreEqual(expectedResult, result); }
public void IsWeekend() { CigarParty weekendTesting = new CigarParty(); //arrange Assert.AreEqual(false, weekendTesting.HaveParty(30, true)); //Assert/Act Assert.AreEqual(true, weekendTesting.HaveParty(50, true)); Assert.AreEqual(true, weekendTesting.HaveParty(70, true)); }
public void IsWeekday() { CigarParty weekendTesting = new CigarParty(); Assert.AreEqual(false, weekendTesting.HaveParty(30, false)); Assert.AreEqual(true, weekendTesting.HaveParty(50, false)); Assert.AreEqual(false, weekendTesting.HaveParty(70, false)); }
public void HavePartyTest() { Assert.IsFalse(_cigarParty.HaveParty(30, false)); Assert.IsTrue(_cigarParty.HaveParty(50, false)); Assert.IsTrue(_cigarParty.HaveParty(70, true)); Assert.IsTrue(_cigarParty.HaveParty(500, true)); Assert.IsFalse(_cigarParty.HaveParty(39, false)); }
public void CigarParty() { CigarParty testCigarParty = new CigarParty(); Assert.AreEqual(false, testCigarParty.HaveParty(30, false), "Input: CigarParty (30, false)"); Assert.AreEqual(true, testCigarParty.HaveParty(50, false), "Input: CigarParty (50, false)"); Assert.AreEqual(true, testCigarParty.HaveParty(70, true), "Input: CigarParty (70, true)"); }
public void HavePartyTest() { CigarParty myCigarParty = new CigarParty(); Assert.AreEqual(false, myCigarParty.HaveParty(30, false)); Assert.AreEqual(true, myCigarParty.HaveParty(50, true)); Assert.AreEqual(true, myCigarParty.HaveParty(70, true)); }
public void HaveParty() { CigarParty lae = new CigarParty(); Assert.IsFalse(lae.HaveParty(30, false)); Assert.IsTrue(lae.HaveParty(50, false)); Assert.IsTrue(lae.HaveParty(70, true)); Assert.IsTrue(lae.HaveParty(70, true)); }
public void HavePartyVariables() { CigarParty lae = new CigarParty(); Assert.IsTrue(lae.HaveParty(50, false || true)); Assert.IsFalse(lae.HaveParty(10, false)); Assert.IsTrue(lae.HaveParty(100, true)); Assert.IsFalse(lae.HaveParty(10, true || false)); }
public void CigarPartyTest() { CigarParty newParty = new CigarParty(); Assert.IsTrue(newParty.HaveParty(60, false)); Assert.IsTrue(newParty.HaveParty(70, true)); Assert.IsFalse(newParty.HaveParty(39, false)); Assert.IsFalse(newParty.HaveParty(70, false)); }
public void TestWeekendCigarPartyBounds() { CigarParty weekdayParty = new CigarParty(); bool isWeekend = true; int[] numOfCigars = { 39, 40, 999999 }; Assert.IsFalse(weekdayParty.HaveParty(numOfCigars[0], isWeekend)); Assert.IsTrue(weekdayParty.HaveParty(numOfCigars[1], isWeekend)); Assert.IsTrue(weekdayParty.HaveParty(numOfCigars[2], isWeekend)); }
public void HavePartyTest() { var exercise = new CigarParty(); //haveParty(30, false) → false Assert.AreEqual(false, exercise.HaveParty(30, false)); //haveParty(50, false) → true Assert.AreEqual(true, exercise.HaveParty(50, false)); //haveParty(70, true) → true Assert.AreEqual(true, exercise.HaveParty(70, true)); }
public void WeekendPartyParty() { CigarParty party = new CigarParty(); Assert.AreEqual(true, party.HaveParty(40, true)); Assert.AreEqual(true, party.HaveParty(60, true)); Assert.AreEqual(false, party.HaveParty(28, true)); Assert.AreEqual(true, party.HaveParty(65, true)); }
public void WeekdayPartyParty() { CigarParty party = new CigarParty(); Assert.AreEqual(true, party.HaveParty(40, false)); Assert.AreEqual(true, party.HaveParty(60, false)); Assert.AreEqual(false, party.HaveParty(67, false)); Assert.AreEqual(false, party.HaveParty(35, false)); }
public void TestCigarParty() { bool actual = cigarParty.HaveParty(30, false); bool actual2 = cigarParty.HaveParty(50, false); bool actual3 = cigarParty.HaveParty(70, true); //haveParty(30, false) → false //haveParty(50, false) → true //haveParty(70, true) → true Assert.AreEqual(false, actual); Assert.AreEqual(true, actual2); Assert.AreEqual(true, actual3); }
public void CigarPartyWithFiftyCigarsReturnsTrue() { //arrange CigarParty party = new CigarParty(); //act bool partyWeekend = party.HaveParty(50, true); bool partyWeekDay = party.HaveParty(50, false); //assert Assert.AreEqual(true, partyWeekDay); Assert.AreEqual(true, partyWeekend); }
public void TestWeekendCigarParty() { CigarParty weekdayParty = new CigarParty(); bool isWeekend = true; int[] numOfCigars = { 44, 55, 30, 22, 99 }; Assert.IsTrue(weekdayParty.HaveParty(numOfCigars[0], isWeekend)); Assert.IsTrue(weekdayParty.HaveParty(numOfCigars[1], isWeekend)); Assert.IsFalse(weekdayParty.HaveParty(numOfCigars[2], isWeekend)); Assert.IsFalse(weekdayParty.HaveParty(numOfCigars[3], isWeekend)); Assert.IsTrue(weekdayParty.HaveParty(numOfCigars[4], isWeekend)); }
public void havePartyTest() { CigarParty testClass = new CigarParty(); bool result = testClass.HaveParty(30, false); Assert.IsFalse(result); result = testClass.HaveParty(50, false); Assert.IsTrue(result); result = testClass.HaveParty(70, true); Assert.IsTrue(result); }
public void RangeOfValuesForWeekdayTests() { //Arrange CigarParty party = new CigarParty(); //Assert //Good Parties Assert.AreEqual(true, party.HaveParty(40, false)); Assert.AreEqual(true, party.HaveParty(60, false)); //Bad PArties Assert.AreEqual(false, party.HaveParty(39, false)); Assert.AreEqual(false, party.HaveParty(61, false)); }
public void CigarParty60T() { CigarParty party = new CigarParty(); bool success = party.HaveParty(60, false); Assert.IsTrue(success); }
public void CigarParty61T() { CigarParty party = new CigarParty(); bool success = party.HaveParty(61, true); Assert.IsTrue(success); }
public void HaveParty_30CigarsWeekday_False() { CigarParty cp = new CigarParty(); bool result = cp.HaveParty(30, false); Assert.AreEqual(false, result); }
public void CigarParty61F() { CigarParty party = new CigarParty(); bool success = party.HaveParty(61, false); Assert.IsFalse(success); }
public void HaveParty_70CigarsWeekend_True() { CigarParty cp = new CigarParty(); bool result = cp.HaveParty(70, true); Assert.AreEqual(true, result); }
public void HaveParty_50CigarsWeekday_True() { CigarParty cp = new CigarParty(); bool result = cp.HaveParty(50, false); Assert.AreEqual(true, result); }
public void CigarPartyWeekendTests() { CigarParty cigarParty = new CigarParty(); bool result = cigarParty.HaveParty(70, true); Assert.AreEqual(true, result); }
public void CigarPartyGoodPartyTests() { CigarParty cigarParty = new CigarParty(); bool result = cigarParty.HaveParty(50, false); Assert.AreEqual(true, result); }
public void CigarPartyBadPartyTests() { CigarParty cigarParty = new CigarParty(); bool result = cigarParty.HaveParty(30, false); Assert.AreEqual(false, result); }
public void NoPartyTest() { CigarParty cigarParty = new CigarParty(); bool actual = cigarParty.HaveParty(30, false); Assert.AreEqual(false, actual); }
public void HavePartyTest2() { CigarParty cigarParty = new CigarParty(); bool actual = cigarParty.HaveParty(70, true); Assert.AreEqual(true, actual); }