Exemplo n.º 1
0
  public void testClone() {
    try {
      TmfLocation<String> location1 = fLocation1.clone();
      TmfLocation<Long> location2 = fLocation2.clone();
      TmfLocation<TmfTimestamp> location3 = fLocation3.clone();

      assertEquals("TmfLocation", aString.toString(), location1.toString());
      assertEquals("TmfLocation", aLong.toString(), location2.toString());
      assertEquals("TmfLocation", aTimestamp.toString(), location3.toString());
    } catch (InternalError e) {
      fail("clone()");
    }
  }
Exemplo n.º 2
0
  public void testToString() {
    String aString = "some location";
    Long aLong = 12345L;
    TmfTimestamp aTimestamp = new TmfTimestamp();

    TmfLocation<String> location1 = new TmfLocation<String>(aString);
    TmfLocation<Long> location2 = new TmfLocation<Long>(aLong);
    TmfLocation<TmfTimestamp> location3 = new TmfLocation<TmfTimestamp>(aTimestamp);

    assertEquals("TmfLocation", aString.toString(), location1.toString());
    assertEquals("TmfLocation", aLong.toString(), location2.toString());
    assertEquals("TmfLocation", aTimestamp.toString(), location3.toString());
  }