public void CreateBasicWheat_NewPlant_WheatCreatedAndNumberOfLeavesUpdated() { Gramene g = new Gramene(); g.CreateBasicWheat(10); Assert.AreEqual(10, g.GetLeafNumber()); }
public void SetLeafNumber_FractionalNumberOfLeaves_SameNumberOnOutput() { Gramene g = new Gramene(); g.CreateBasicWheat(10); Assert.AreEqual(10, g.GetLeafNumber()); g.SetLeafNumber(20.6); Assert.AreEqual(20.6, g.GetLeafNumber()); }
public void SetLeafNumber_GreaterThanNumberOfLeavesOnPlant_NewLeavesAdded() { Gramene g = new Gramene(); g.CreateBasicWheat(10); Assert.AreEqual(10, g.GetLeafNumber()); g.SetLeafNumber(20); Assert.AreEqual(20, g.GetLeafNumber()); }
public void SetLeafNumber_SameNumberOfLeavesOnPlant_NoChanges() { Gramene g = new Gramene(); g.CreateBasicWheat(10); Assert.AreEqual(10, g.GetPlantLeafNumber()); g.SetLeafNumber(10); Assert.AreEqual(10, g.GetPlantLeafNumber()); }
public void SetLeafNumber_UseItTwice_LeafNumberIncremented() { Gramene g = new Gramene(); g.CreateBasicWheat(10); Assert.AreEqual(10, g.GetLeafNumber()); g.SetLeafNumber(15); Assert.AreEqual(15, g.GetLeafNumber()); g.SetLeafNumber(20); Assert.AreEqual(20, g.GetLeafNumber()); }
public void Gramene_CopyOfGramene_CorrectlyCopied() { // Creation of a gramene Gramene g = new Gramene(); g.CreateBasicWheat(10); // Copy of a gramene Gramene g1 = new Gramene(g); Assert.AreEqual(g1.GetCursor(), g.GetCursor()); Assert.AreEqual(10, g1.GetLeafNumber()); }