示例#1
0
  @Test
  public void testConstructorAndGetters() {
    // Set up

    // Invoke
    final GAV gav = new GAV(GROUP_ID, ARTIFACT_ID, VERSION);

    // Check
    assertEquals(GROUP_ID, gav.getGroupId());
    assertEquals(ARTIFACT_ID, gav.getArtifactId());
    assertEquals(VERSION, gav.getVersion());
  }
示例#2
0
  @Test
  public void testGetInstance() {
    // Set up
    final String coordinates =
        StringUtils.arrayToDelimitedString(
            new String[] {GROUP_ID, ARTIFACT_ID, VERSION}, MavenUtils.COORDINATE_SEPARATOR);

    // Invoke
    final GAV gav = GAV.getInstance(coordinates);

    // Check
    assertEquals(GROUP_ID, gav.getGroupId());
    assertEquals(ARTIFACT_ID, gav.getArtifactId());
    assertEquals(VERSION, gav.getVersion());
  }