public class ComponentServiceTest
extends java.lang.Object
| Constructor and Description |
|---|
ComponentServiceTest() |
public static void initCommonStatics()
public static void tearDownCommonStatics()
public void setup()
public void clone_shouldCopyFields_andGenerateNewUuid()
public void cloneWholeComponent_shouldChangeTitle_andCloneHtmlPath_onSuccess()
throws java.io.IOException
java.io.IOExceptionpublic void cloneWholeComponent_onIOException_shouldKeepOriginalHtmlPath_andStillChangeTitle()
throws java.io.IOException
java.io.IOExceptionpublic void bindToProperties_shouldFillFields_andHtmlExistsFlag()
public void updateComponentAfterEdit_shouldUpdateSelectedFields_andCallDaoUpdate()
public void createAndPersistComponent_withProperties_shouldBind_thenPersist_andUpdateStudy()
public void renameHtmlFilePath_withEmptyNew_shouldPersistEmpty_andNotTouchFS()
throws java.io.IOException
java.io.IOExceptionpublic void renameHtmlFilePath_whenCurrentMissing_shouldOnlyPersistNew_andNotRenameFile()
throws java.io.IOException
java.io.IOExceptionpublic void renameHtmlFilePath_whenCurrentExists_shouldOptionallyRename_andPersistNew()
throws java.io.IOException
java.io.IOExceptionpublic void validate_validComponent_shouldNotThrow()
public void validate_invalidComponent_shouldThrow()
public void remove_shouldUpdateStudy_removeResults_andRemoveComponent()
public void getComponentFromIdOrUuid_withId_shouldReturn_andCheckPermissions()
throws NotFoundException,
ForbiddenException
NotFoundExceptionForbiddenExceptionpublic void getComponentFromIdOrUuid_withUuid_shouldReturn_andCheckPermissions()
throws NotFoundException,
ForbiddenException
NotFoundExceptionForbiddenExceptionpublic void getComponentFromIdOrUuid_withUnknownId_shouldThrowNotFound()
throws NotFoundException,
ForbiddenException
NotFoundExceptionForbiddenExceptionpublic void getComponentFromIdOrUuid_withUnknownUuid_shouldThrowNotFound()
throws NotFoundException,
ForbiddenException
NotFoundExceptionForbiddenException