Skip to content

Commit

Permalink
fix: test Library
Browse files Browse the repository at this point in the history
  • Loading branch information
teletha committed Oct 13, 2024
1 parent 7c188a2 commit ca42b23
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/bee/api/Library.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public File getLocalJavadocJar() {
*
* @return
*/
public String getPOM() {
String getPOM() {
return localPath(".pom");
}

Expand All @@ -202,7 +202,7 @@ public String getPOM() {
*
* @return
*/
public File getLocalPOM() {
File getLocalPOM() {
return I.make(Repository.class).getLocalRepository().file(getPOM());
}

Expand Down
39 changes: 39 additions & 0 deletions src/test/java/bee/api/LibraryTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (C) 2023 Nameless Production Committee
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://opensource.org/licenses/mit-license.php
*/
package bee.api;

import org.junit.jupiter.api.Test;

public class LibraryTest {

@Test
void jar() {
Library library = new Library("group", "test", "1.0");
assert library.getJar().equals("group/test/1.0/test-1.0.jar");
}

@Test
void javadocJar() {
Library library = new Library("group", "test", "1.0");
assert library.getJavadocJar().equals("group/test/1.0/test-1.0-javadoc.jar");
}

@Test
void sourceJar() {
Library library = new Library("group", "test", "1.0");
assert library.getSourceJar().equals("group/test/1.0/test-1.0-sources.jar");
}

@Test
void pom() {
Library library = new Library("group", "test", "1.0");
assert library.getPOM().equals("group/test/1.0/test-1.0.pom");
}
}

0 comments on commit ca42b23

Please sign in to comment.