Package net.shibboleth.idp.admin.impl
Class DoStorageOperationTest
- java.lang.Object
-
- net.shibboleth.idp.admin.impl.DoStorageOperationTest
-
public class DoStorageOperationTest extends Object
Unit test forDoStorageOperationaction.
-
-
Field Summary
Fields Modifier and Type Field Description private net.shibboleth.idp.admin.impl.DoStorageOperationactionprivate static StringCONTEXTTest context.private static StringKEYTest key.private com.fasterxml.jackson.databind.ObjectMappermapperprivate RequestContextrcprivate MockHttpServletRequestrequestprivate MockHttpServletResponseresponseprivate MemoryStorageServicestorageServiceprivate static StringVALUETest value.
-
Constructor Summary
Constructors Constructor Description DoStorageOperationTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidduplicateCreate()Test duplicate create.voidfailedUpdateWithVersion()Test failed update with a version.voidinvalidMethod()Test invalidMethodvoidmissingDelete()Test missing delete.voidmissingGet()Test with no inputs.voidmissingUpdateWithVersion()Test failed update with a version when record missing.voidnoParams()Test with no inputs.voidsetUp()Set up test.voidsuccessCreate()Test successful create.voidsuccessDelete()Test successful delete.voidsuccessGet()Test successful get.voidsuccessUpdate()Test successful update.voidsuccessUpdateAsCreate()Test successful update as a create.voidsuccessUpdateWithVersion()Test successful update with a version.voidtearDown()Tear down test.
-
-
-
Field Detail
-
CONTEXT
@Nonnull @NotEmpty private static final String CONTEXT
Test context.- See Also:
- Constant Field Values
-
KEY
@Nonnull @NotEmpty private static final String KEY
Test key.- See Also:
- Constant Field Values
-
VALUE
@Nonnull @NotEmpty private static final String VALUE
Test value.- See Also:
- Constant Field Values
-
storageService
private MemoryStorageService storageService
-
mapper
private com.fasterxml.jackson.databind.ObjectMapper mapper
-
action
private net.shibboleth.idp.admin.impl.DoStorageOperation action
-
rc
private RequestContext rc
-
request
private MockHttpServletRequest request
-
response
private MockHttpServletResponse response
-
-
Method Detail
-
setUp
@BeforeMethod public void setUp() throws ComponentInitializationExceptionSet up test.- Throws:
ComponentInitializationException
-
tearDown
@AfterMethod public void tearDown()
Tear down test.
-
noParams
public void noParams()
Test with no inputs.
-
invalidMethod
public void invalidMethod()
Test invalidMethod
-
missingGet
public void missingGet()
Test with no inputs.
-
successGet
public void successGet() throws IOException, ParseExceptionTest successful get.- Throws:
IOExceptionParseException
-
missingDelete
public void missingDelete() throws IOException, ParseExceptionTest missing delete.- Throws:
IOExceptionParseException
-
successDelete
public void successDelete() throws IOException, ParseExceptionTest successful delete.- Throws:
IOExceptionParseException
-
successCreate
public void successCreate() throws IOException, ParseExceptionTest successful create.- Throws:
IOExceptionParseException
-
duplicateCreate
public void duplicateCreate() throws IOException, ParseExceptionTest duplicate create.- Throws:
IOExceptionParseException
-
successUpdate
public void successUpdate() throws IOException, ParseExceptionTest successful update.- Throws:
IOExceptionParseException
-
successUpdateAsCreate
public void successUpdateAsCreate() throws IOException, ParseExceptionTest successful update as a create.- Throws:
IOExceptionParseException
-
successUpdateWithVersion
public void successUpdateWithVersion() throws IOException, ParseExceptionTest successful update with a version.- Throws:
IOExceptionParseException
-
failedUpdateWithVersion
public void failedUpdateWithVersion() throws IOException, ParseExceptionTest failed update with a version.- Throws:
IOExceptionParseException
-
missingUpdateWithVersion
public void missingUpdateWithVersion() throws IOException, ParseExceptionTest failed update with a version when record missing.- Throws:
IOExceptionParseException
-
-