Removed visibility modifier code smells

This commit is contained in:
Marvin Scham
2023-05-24 01:08:53 +02:00
parent 50eb408b2f
commit a41d3c473c
3 changed files with 15 additions and 15 deletions

View File

@@ -22,7 +22,7 @@ import org.mockito.MockitoAnnotations;
import de.rwu.easydrop.api.client.AmazonProductDataSource;
import de.rwu.easydrop.api.dto.ProductDTO;
public class AmazonProductDataSourceTest {
class AmazonProductDataSourceTest {
private AmazonProductDataSource demoDataSource;
@@ -32,7 +32,7 @@ public class AmazonProductDataSourceTest {
private static String demoProductId = "whateverId";
@BeforeEach
public void setup() {
void setup() {
demoDataSource = new AmazonProductDataSource(
demoApiUrl,
demoApiKey);
@@ -40,7 +40,7 @@ public class AmazonProductDataSourceTest {
}
@Test
public void testConstructor() {
void testConstructor() {
// Assert
try {
Field baseUrlField = AmazonProductDataSource.class.getDeclaredField("baseUrl");
@@ -58,7 +58,7 @@ public class AmazonProductDataSourceTest {
}
@Test
public void testCreateApiUrl() throws MalformedURLException {
void testCreateApiUrl() throws MalformedURLException {
// Test case 1
String productId1 = "12345";
URL expectedUrl1 = new URL(
@@ -76,7 +76,7 @@ public class AmazonProductDataSourceTest {
}
@Test
public void testBuildProductDTO_completeData() {
void testBuildProductDTO_completeData() {
// Set up the test environment
String json = "{\"featuredOffer\": {\"availability\": \"available\"," +
"\"price\": {\"value\": {\"amount\": 10.0}}," +
@@ -96,7 +96,7 @@ public class AmazonProductDataSourceTest {
}
@Test
public void testBuildProductDTO_incompleteData() {
void testBuildProductDTO_incompleteData() {
// Set up the test environment
String json = "{\"otherOffer\": {\"availability\": \"available\"," +
"\"price\": {\"value\": {\"amount\": 10.0}}," +
@@ -116,7 +116,7 @@ public class AmazonProductDataSourceTest {
}
@Test
public void testGetProductDTOById_successfulRequest() throws IOException {
void testGetProductDTOById_successfulRequest() throws IOException {
// Set up the test environment
String mockResponse = "{\"featuredOffer\": {\"availability\": \"available\"," +
"\"price\": {\"value\": {\"amount\": 10.0}}," +
@@ -146,7 +146,7 @@ public class AmazonProductDataSourceTest {
}
@Test
public void testGetProductDTOById_failedRequest() throws IOException {
void testGetProductDTOById_failedRequest() throws IOException {
// Set up the test environment
AmazonProductDataSource dataSource = mock(AmazonProductDataSource.class);
@@ -167,7 +167,7 @@ public class AmazonProductDataSourceTest {
}
@Test
public void testGetProductDTOById_ioException() throws IOException {
void testGetProductDTOById_ioException() throws IOException {
// Set up the test environment
AmazonProductDataSource dataSource = mock(AmazonProductDataSource.class);
URL mockURL = mock(URL.class);