public void AnimalToStringTest() { IAnimal target = new Animal("Barry", AnimalTypes.animalTypes.Cat); string expected = "Barry: Cat"; string actual; actual = target.ToString(); Assert.AreEqual(expected, actual); }
private void button1_Click_1(object sender, EventArgs e) { animal = new Dog(RegNummer++, new SimpleDate(17, 12, 2016), "Bijke", new SimpleDate(1, 1, 1980)); MessageBox.Show(animal.ToString()); }
public void ToStringTest1() { string name = string.Empty; // TODO: Initialize to an appropriate value AnimalTypes.animalTypes type = new AnimalTypes.animalTypes(); // TODO: Initialize to an appropriate value Animal target = new Animal(name, type); // TODO: Initialize to an appropriate value string expected = string.Empty; // TODO: Initialize to an appropriate value string actual; actual = target.ToString(); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
/// <summary> /// Show the info of the animal referenced by the 'animal' field. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void showInfoButton_Click(object sender, EventArgs e) { Animal currentAnimal = listBoxAnimalsNotReserved.SelectedItem as Animal; MessageBox.Show(currentAnimal.ToString()); }