Software Engineering “im WiSe18"
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TestAccount.java 821B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import org.junit.Test;
  2. import static org.junit.Assert.*;
  3. public class TestAccount {
  4. @Test
  5. public void test1(){
  6. // Arrange
  7. Person p = new Person("Hans","Georg", 12);
  8. // Act
  9. Account a = new Account(p, "fdfdf");
  10. // Assert
  11. assertEquals("Georg", a.owner.vname);
  12. }
  13. @Test
  14. public void testM2(){
  15. // Arrange
  16. Person p = new Person("Hans","Georg", 12);
  17. // Act
  18. Account a = new Account(p, "fdfdf");
  19. // Assert
  20. assertEquals("Georg", a.owner.vname);
  21. }
  22. @Test
  23. public void test3(){
  24. // Arrange
  25. Person p = new Person("Hans","Georg", 12);
  26. // Act
  27. Account a = new Account(p, "fdfdf");
  28. // Assert
  29. assertEquals(12, a.owner.age);
  30. }
  31. }