Skip to content

Commit

Permalink
Mosip 17586 sonar coverage 14 (#799)
Browse files Browse the repository at this point in the history
* WIP-idservimpl-tests

* Added test case

* Test fix
  • Loading branch information
loganathan-sekaran authored Jan 19, 2022
1 parent 968df83 commit 7f131da
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestContext;
import org.springframework.test.context.junit4.SpringRunner;
Expand All @@ -59,10 +57,9 @@
@ContextConfiguration(classes = { TestContext.class, WebApplicationContext.class })
@WebMvcTest
@AutoConfigureMockMvc
@Import(EnvUtil.class)
public class BaseIDAFilterTest {

@Autowired
@Mock
EnvUtil env;

@Mock
Expand Down Expand Up @@ -136,6 +133,8 @@ public void setup() {
ReflectionTestUtils.setField(baseIDAFilter, "mapper", mapper);
ReflectionTestUtils.setField(baseIDAFilter, "keyManager", keyManager);
ReflectionTestUtils.setField(baseIDAFilter, "requestResponsConsumerUtil", requestResponsConsumerUtil);

EnvUtil.setDateTimePattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
}

@Test
Expand Down

0 comments on commit 7f131da

Please sign in to comment.