Class SapcoreJCoRecJUnitTest

Direct Known Subclasses:
DefaultJCoMockRepositoryFactoryTest, SapcorebolSpringJUnitTest, SapcoreJCoRecorderTestPlaybackMode

@ContextConfiguration(locations="jcorec-test-spring.xml") public class SapcoreJCoRecJUnitTest extends SapcoreJCoJUnitTest
Base class for testing with the help of the JCoRecorder.
  • Field Details

    • name

      public org.junit.rules.TestName name
      This is the name of the current test-method. It is used for the key of the repository.
    • watcher

      public final JCoRecJUnitTestWatcher watcher
      Rule notifying about failed and succeeded tests. In case of a failed test the recording will not be saved in order saving only successful tests and leaving existing files untouched.
    • DEFAULT_RELATIVE_RECORDING_DIRECTORY

      public static final String DEFAULT_RELATIVE_RECORDING_DIRECTORY
      Default relative recording directory in extensions.
  • Constructor Details

    • SapcoreJCoRecJUnitTest

      public SapcoreJCoRecJUnitTest()
  • Method Details

    • setUp

      public void setUp()
      Description copied from class: SapcoretestSpringJUnitTest
      Standard test setUp method.
      Overrides:
      setUp in class SapcoreSpringJUnitTest
    • getRecordingMode

      public JCoRecMode getRecordingMode()
      Returns recording mode.
      Returns:
      the recordingMode
    • getRecordingExtensionName

      public String getRecordingExtensionName()
      Returns:
      the recordingExtensionName
    • testFailed

      public void testFailed()
      Executed if the test fails. Recording is not saved.
    • testSucceeded

      public void testSucceeded()
      Executed if the test succeeded. Recording is saved.
    • getRelativeRecordingDirectory

      public String getRelativeRecordingDirectory()
      Getter for relative recording directory.
      Returns:
      the relativeRecordingDirectory
    • getRecordingAnnotation

      protected JCoRecording getRecordingAnnotation()
      Returns JCoRecording of the unit test.
      Returns:
      Annotation if set, null otherwise