Package jetbrains.buildServer.vcs
Class AbstractCommitSupportTest
- java.lang.Object
-
- junit.framework.Assert
-
- jetbrains.buildServer.MockSupport
-
- jetbrains.buildServer.AfterTestHook
-
- jetbrains.buildServer.BaseTestCase
-
- jetbrains.buildServer.vcs.AbstractCommitSupportTest
-
- All Implemented Interfaces:
org.testng.IHookable
,org.testng.ITestNGListener
public abstract class AbstractCommitSupportTest extends BaseTestCase
- Author:
- kir
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
AbstractCommitSupportTest.CommitEditor
-
Nested classes/interfaces inherited from class jetbrains.buildServer.BaseTestCase
BaseTestCase.UnderLockedFile
-
-
Field Summary
Fields Modifier and Type Field Description protected CommitPatchBuilder
myCommitPatchBuilder
static String
TEST_DIR
static String
TEST_FILE_PATH
-
Fields inherited from class jetbrains.buildServer.BaseTestCase
IS_WINDOWS, myTestLogger, OS_NAME
-
Fields inherited from class jetbrains.buildServer.MockSupport
ANYTHING, NOT_NULL, NULL
-
-
Constructor Summary
Constructors Constructor Description AbstractCommitSupportTest()
-
Method Summary
-
Methods inherited from class jetbrains.buildServer.BaseTestCase
assertArraysEqual, assertArraysEqual, assertContains, assertContains, assertContains, assertContains, assertContains, assertContainsAll, assertContainsAny, assertContainsWithCount, assertEmpty, assertEmpty, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsIgnoreNonBMP, assertExceptionThrown, assertExceptionThrown, assertExceptionThrown, assertExceptionThrown, assertExceptionThrown, assertGreater, assertGreater, assertGreaterOrEquals, assertHasWithCount, assertInstanceOf, assertListEquals, assertMap, assertMapping, assertMatches, assertMatches, assertMeaningTextEquals, assertNotContains, assertNotContains, assertNotContains, assertNotEmpty, assertNull2, assertSameElements, assertSameElements, assertSameElements, assertSetEquals, assertTime, assertTime, assertTimestampEquals, assertXmlEqual, assertXmlEqual, averageExecutionTime, checkOrderedCollection, checkOrderedCollection, checkUnorderedCollection, checkUnorderedCollection, clearFailure, createMap, createSet, createTempDir, createTempFile, createTempFile, createTempFile, createTestLogger, doUnderLockedDirectory, doUnderLockedFile, doUnderUnreadableLockedFile, dumpCollection, dumpFile, dumpItems, enableAndRecordDebugLog, enableDebug, enableDebug, enableInfo, env, getLoggedFailure, getName, getProjectDir, getTestDataFile, getTestFiles, getTestFilesDataPath, hasCustomInternalProperty, isPropertyDefined, listFilesOrDie, listFilesOrDie, log, performAfterTestVerification, provideWithBooleans, provideWithLinuxMacWindows, provideWithWindowsOnly, registerAsTempFile, removeInternalProperty, resetAllFields, resetFields2Null, runAndReportMemoryAllocations, runAsync, runAsync, runAsyncAndFailOnException, setInternalProperty, setInternalProperty, setInternalProperty, setLogLevel, setName, setUp, setUpClass, setupSuite, startThreadsAsync, tearDown, threadDump, toProvide, trueFalseDataProvider, waitFor, waitFor, waitFor, writeTextToFile
-
Methods inherited from class jetbrains.buildServer.AfterTestHook
finishAfterTestHook, initializeAfterTestHook, run
-
Methods inherited from class jetbrains.buildServer.MockSupport
and, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, atLeastOnce, collectionContaining, collectionContaining, compatibleType, contains, containsInAnyOrder, containsInAnyOrder, containsInOrder, containsInOrder, defaultMockNameForType, doAll, doAll, doAll, doAll, endsWith, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, exactly, hasProperty, hasProperty, isA, isGreaterThan, isIn, isIn, isLessThan, mapContaining, mapContaining, mapWithKey, mapWithKey, mapWithValue, mapWithValue, mock, mock, never, never, newDummy, newDummy, newDummy, not, not, once, onConsecutiveCalls, onConsecutiveCalls, onConsecutiveCalls, onConsecutiveCalls, or, returnIterator, returnIterator, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, same, setUpMocks, startsWith, stringContains, tearDownMocks, throwException, toString, verify
-
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
-
-
-
-
Field Detail
-
TEST_DIR
public static final String TEST_DIR
- See Also:
- Constant Field Values
-
TEST_FILE_PATH
public static final String TEST_FILE_PATH
- See Also:
- Constant Field Values
-
myCommitPatchBuilder
protected CommitPatchBuilder myCommitPatchBuilder
-
-
Method Detail
-
rootToTest
@NotNull protected abstract VcsRootImpl rootToTest() throws Exception
- Returns:
- VcsRoot to be tested
- Throws:
Exception
-
commitSupport
@NotNull protected abstract CommitSupport commitSupport() throws VcsException
- Returns:
- Commit support to be tested
- Throws:
VcsException
-
getContentProvider
@NotNull protected abstract VcsFileContentProvider getContentProvider() throws Exception
- Parameters:
path
- relative to VcsRoot- Returns:
- content of the file for the path
- Throws:
VcsException
Exception
-
getCurrentRevision
@NotNull protected abstract String getCurrentRevision(VcsRootImpl root) throws VcsException
- Parameters:
root
-- Returns:
- Current VCS revision for the root
- Throws:
VcsException
-
should_allow_to_commit_one_file
public void should_allow_to_commit_one_file() throws Exception
- Throws:
Exception
-
should_allow_to_commit_one_file_twice
public void should_allow_to_commit_one_file_twice() throws Exception
- Throws:
Exception
-
should_allow_to_commit_one_file_twice_same_content
public void should_allow_to_commit_one_file_twice_same_content() throws Exception
- Throws:
Exception
-
should_allow_to_delete_file
public void should_allow_to_delete_file() throws Exception
- Throws:
Exception
-
should_allow_to_delete_several_files_including_non_existing
public void should_allow_to_delete_several_files_including_non_existing() throws Exception
- Throws:
Exception
-
should_allow_to_delete_directory
public void should_allow_to_delete_directory() throws Exception
- Throws:
Exception
-
should_allow_to_delete_non_existing_directory
public void should_allow_to_delete_non_existing_directory() throws Exception
- Throws:
Exception
-
should_allow_to_delete_non_existing_paths_other_operations
public void should_allow_to_delete_non_existing_paths_other_operations() throws Exception
- Throws:
Exception
-
should_allow_to_delete_non_existing_paths_which_existed_before
public void should_allow_to_delete_non_existing_paths_which_existed_before() throws Exception
- Throws:
Exception
-
should_allow_to_remove_directory_and_readd_file_in_it
public void should_allow_to_remove_directory_and_readd_file_in_it() throws Exception
- Throws:
Exception
-
should_allow_to_rename_file
public void should_allow_to_rename_file() throws Exception
- Throws:
Exception
-
should_allow_to_commit_multiple_files_join_operations
public void should_allow_to_commit_multiple_files_join_operations() throws Exception
- Throws:
Exception
-
fileData
@NotNull protected ByteArrayInputStream fileData(String fileText)
-
driveCommit
protected void driveCommit(boolean commitExpected, AbstractCommitSupportTest.CommitEditor editor) throws Exception
- Throws:
Exception
-
-