public void TestHappyPathPickFruitReturn() { // Arrange FruitTree appleTree = new FruitTree("Apple", 25); int numberOfApplesToPick = 10; // Act bool didPickFruit = appleTree.PickFruit(numberOfApplesToPick); // Assert Assert.IsTrue(didPickFruit); }
public void TestPickNegativeFruit() { // Arrange FruitTree appleTree = new FruitTree("Apple", 25); int numberOfApplesToPick = -10; // Act bool didPickFruit = appleTree.PickFruit(numberOfApplesToPick); // Assert Assert.IsFalse(didPickFruit, "I passed in -10 pieces and shouldn't be able to pick them"); }
public void TestHappyPathPickFruit() { // Arrange FruitTree appleTree = new FruitTree("Apple", 25); int numberOfApplesToPick = 10; int numberOfApplesLeft = 15; // Act bool didPickFruit = appleTree.PickFruit(numberOfApplesToPick); // Assert Assert.AreEqual(numberOfApplesLeft, appleTree.PiecesOfFruitLeft); }