Skip to content

Commit

Permalink
Add not-null annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianVennen committed Dec 6, 2023
1 parent 94f4397 commit 601ad06
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
import com.exaroton.api.APIRequest;
import com.exaroton.api.ExarotonClient;
import com.exaroton.api.billing.pools.CreditPool;
import org.jetbrains.annotations.NotNull;

import java.util.HashMap;

public abstract class CreditPoolRequest<T> extends APIRequest<T> {
private final String poolId;

public CreditPoolRequest(ExarotonClient client, String id) {
public CreditPoolRequest(@NotNull ExarotonClient client, @NotNull String id) {
super(client);
this.poolId = id;
}
Expand Down
7 changes: 4 additions & 3 deletions src/test/java/APIClientTest.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import com.exaroton.api.ExarotonClient;
import com.exaroton.api.server.Server;
import org.jetbrains.annotations.NotNull;

public abstract class APIClientTest {
protected static final String TEST_SERVER_ID = System.getenv("EXAROTON_TEST_SERVER");
protected final ExarotonClient client = new ExarotonClient(System.getenv("EXAROTON_API_TOKEN"));
protected final Server server = client.getServer(TEST_SERVER_ID);
protected static final @NotNull String TEST_SERVER_ID = System.getenv("EXAROTON_TEST_SERVER");
protected final @NotNull ExarotonClient client = new ExarotonClient(System.getenv("EXAROTON_API_TOKEN"));
protected final @NotNull Server server = client.getServer(TEST_SERVER_ID);
}
3 changes: 2 additions & 1 deletion src/test/java/CreditPoolsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
import com.exaroton.api.billing.pools.CreditPool;
import com.exaroton.api.billing.pools.CreditPoolMember;
import com.exaroton.api.server.Server;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import java.util.Arrays;
import java.util.Optional;

public class CreditPoolsTest extends APIClientTest {
private static final String TEST_POOL_ID = System.getenv("EXAROTON_TEST_POOL");
private static final @NotNull String TEST_POOL_ID = System.getenv("EXAROTON_TEST_POOL");

@Test
public void testGetCreditPools() throws APIException {
Expand Down

0 comments on commit 601ad06

Please sign in to comment.