Initial commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
package com.mattrixwv.cipherstream.aspect;
|
||||
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.mockito.InjectMocks;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
|
||||
@Tag("unit-test")
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
public class CipherStreamLoggingAspectTest{
|
||||
@InjectMocks
|
||||
private CipherStreamLoggingAspect aspect;
|
||||
|
||||
|
||||
@Test
|
||||
public void testMappedFunction(){
|
||||
aspect.mappedFunction();
|
||||
|
||||
|
||||
assertNotNull(aspect);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCipherMethod(){
|
||||
aspect.cipherMethod();
|
||||
|
||||
|
||||
assertNotNull(aspect);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetCipherInfo(){
|
||||
ObjectNode jsonNode = new ObjectMapper().createObjectNode();
|
||||
jsonNode.put("something", "Something Important");
|
||||
|
||||
|
||||
aspect.getCipherInfo(null);
|
||||
|
||||
|
||||
assertNotNull(aspect);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user