Skip to content

Commit cd32c53

Browse files
Add unit tests for SDKController, verifying constructor initialization and constant values to ensure robust functionality and high test coverage.
1 parent 95ee546 commit cd32c53

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.contentstack.sdk;
2+
3+
import org.junit.Test;
4+
5+
import static org.junit.Assert.assertEquals;
6+
import static org.junit.Assert.assertNotNull;
7+
8+
public class SDKControllerTest {
9+
10+
@Test
11+
public void testConstructorCoverage() {
12+
SDKController controller = new SDKController();
13+
assertNotNull(controller);
14+
}
15+
16+
@Test
17+
public void testConstantsValues() {
18+
assertEquals("getQueryEntries", SDKController.GET_QUERY_ENTRIES);
19+
assertEquals("getSingleQueryEntries", SDKController.SINGLE_QUERY_ENTRIES);
20+
assertEquals("getEntry", SDKController.GET_ENTRY);
21+
assertEquals("getAllAssets", SDKController.GET_ALL_ASSETS);
22+
assertEquals("getAssets", SDKController.GET_ASSETS);
23+
assertEquals("getSync", SDKController.GET_SYNC);
24+
assertEquals("getContentTypes", SDKController.GET_CONTENT_TYPES);
25+
assertEquals("getGlobalFields", SDKController.GET_GLOBAL_FIELDS);
26+
}
27+
}

0 commit comments

Comments
 (0)