Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. package model;
  2.  
  3. public class Foo {
  4. private String value;
  5.  
  6. public Foo(String v) { this.value = v; }
  7.  
  8. public String toString() { return this.value; }
  9. }
  10.  
  11. package model;
  12.  
  13. public class FooTest {
  14.  
  15. @Test
  16. public void testToString() {
  17. String expected = "Test";
  18. Foo foo = new Foo(expected);
  19. Assert.assertEquals(expected, foo.toString());
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement