public void DraftBallConstructor_Test() { // Arrange Variables DraftBall draftball = new DraftBall(); bool BallValueGreater = (draftball.DraftBallNumber[0] > 0); bool BallValueLesser = (draftball.DraftBallNumber[0] < 15); // Assertions Assert.AreEqual(BallValueGreater, true, "Draftball number less than 1."); Assert.AreEqual(BallValueLesser, true, "Draftball number greater than 14."); }
public DraftRun(DraftRunLocation drl) { DraftBall draftball = new DraftBall(4); this.Ball1 = draftball.DraftBallNumber[0]; this.Ball2 = draftball.DraftBallNumber[1]; this.Ball3 = draftball.DraftBallNumber[2]; this.Ball4 = draftball.DraftBallNumber[3]; DoDraftRun(Ball1, Ball2, Ball3, Ball4, drl); }
public DraftRun(decimal latitude, decimal longitude) { DraftBall draftball = new DraftBall(4); this.Ball1 = draftball.DraftBallNumber[0]; this.Ball2 = draftball.DraftBallNumber[1]; this.Ball3 = draftball.DraftBallNumber[2]; this.Ball4 = draftball.DraftBallNumber[3]; DraftRunLocation drl = new DraftRunLocation(latitude, longitude); DoDraftRun(Ball1, Ball2, Ball3, Ball4, drl); }
public void MultiDraftBallConstructor_Test() { DraftBall draftball = new DraftBall(4); bool BallValueGreater = (draftball.DraftBallNumber[0] > 0); bool BallValueLesser = (draftball.DraftBallNumber[0] < 15); for (int i = 0; i < 4; i++) { BallValueGreater = draftball.DraftBallNumber[i] > 0; BallValueLesser = draftball.DraftBallNumber[i] < 15; //Assertions Assert.AreEqual(BallValueGreater, true, "Draftball number less than 1."); Assert.AreEqual(BallValueLesser, true, "Draftball number greater than 14."); Console.Write("Position {0} value is {1}.\n", i, draftball.DraftBallNumber[i]); } }
public DraftRun() { DraftRunLocation drl = new DraftRunLocation(); drl.Country = ""; drl.City = ""; drl.Latitude = 0; drl.Longitude = 0; DraftBall draftball = new DraftBall(4); this.Ball1 = draftball.DraftBallNumber[0]; this.Ball2 = draftball.DraftBallNumber[1]; this.Ball3 = draftball.DraftBallNumber[2]; this.Ball4 = draftball.DraftBallNumber[3]; DoDraftRun(Ball1, Ball2, Ball3, Ball4, drl); }