public void MissionSimulation_Success()
        {
            //Arrange
            AdventurerContainer advCon = new AdventurerContainer();

            advCon.Add(new Adventurer("Anders", 4));
            advCon.Add(new Adventurer("Kelrick", 3));
            advCon.Add(new Adventurer("Gubbur", 1));
            Mission miss = new Mission(100, 10, advCon.Container);

            //Act
            string result = miss.SimulateMission();

            //Assert
            Assert.IsTrue(!string.IsNullOrEmpty(result));
        }
Example #2
0
 private void BTNAddAdventurer_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(TBAdventurerName.Text))
     {
         advCon.Add(new Adventurer(TBAdventurerName.Text, (int)NUDMod.Value));
         PopulateAdventurerLV();
     }
     else
     {
         MessageBox.Show("Adventurer should not be empty.", "Errors Validating", MessageBoxButtons.OK);
     }
 }