public class CheckoutTest extends CLIRepositoryTestCase
dbASSUME_UNCHANGED, author, committer, CONTENT, CONTENT_ID, LENGTH, mockSystemReader, MOD_TIME, SMUDGE| Constructor and Description |
|---|
CheckoutTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
fileModeTestFileThenFileWithFolderInIndex()
Steps:
Add file 'a'
Commit
Create branch '1'
Modify file 'a'
Commit
Delete file 'a' & replace by folder 'a' in the working tree & index
Checkout branch '1'
|
void |
fileModeTestFileWithFolderInIndex()
Steps:
Add file 'a'
Commit
Create branch '1'
Modify file 'a'
Commit
Delete file 'a' & replace by folder 'a' in the working tree & index
Checkout branch '1'
|
void |
fileModeTestFolderThenFileWithMissingInWorkingTree()
Steps:
Add folder 'a'
Commit
Create branch '1'
Replace folder 'a'by file 'a'
Commit
Delete file 'a' in the working tree
Checkout branch '1'
|
void |
fileModeTestFolderThenMissingWithFileInWorkingTree()
Steps:
Add folder 'a'
Commit
Create branch '1'
Delete folder 'a'
Commit
Add file 'a' in the working tree
Checkout branch '1'
|
void |
fileModeTestFolderWithMissingInWorkingTree()
Steps:
Add file 'a'
Commit
Create branch '1'
Replace file 'a' by folder 'a'
Commit
Delete folder 'a' in the working tree
Checkout branch '1'
|
void |
fileModeTestMissingThenFolderWithFileInWorkingTree()
Steps:
Add file 'b'
Commit
Create branch '1'
Add folder 'a'
Commit
Replace folder 'a' by file 'a' in the working tree
Checkout branch '1'
|
void |
fileModeTestMissingWithFolderInWorkingTree()
Steps:
Add file 'a'
Commit
Create branch '1'
Delete file 'a'
Commit
Add folder 'a' in the working tree
Checkout branch '1'
|
void |
testCheckoutAllPaths() |
void |
testCheckoutBranch() |
void |
testCheckoutExistingBranchWithConflict() |
void |
testCheckoutHead() |
void |
testCheckoutLink() |
void |
testCheckoutNewBranch() |
void |
testCheckoutNewBranchOnBranchToBeBorn() |
void |
testCheckoutNewBranchThatAlreadyExists() |
void |
testCheckoutNonExistingBranch() |
void |
testCheckoutOrphan() |
void |
testCheckoutPath() |
void |
testCheckoutSelf() |
void |
testCheckoutSingleFile() |
void |
testCheckoutUnresolvedHead() |
void |
testCheckoutWithMissingWorkingTreeFile()
Steps:
Add file 'a' and 'b'
Commit
Create branch '1'
modify file 'a'
Commit
Delete file 'a' in the working tree
Checkout branch '1'
|
assertArrayOfLinesEquals, assertStringArrayEquals, cmdString, contains, deleteTrashFile, escapeJava, execute, executeAndPrint, executeAndPrintTestCode, executeUnchecked, read, setUp, toString, toString, writeLink, writeTrashFileaddRepoToClose, createBareRepository, createRepository, createTempDirectory, createTempFile, createUniqueTestGitDir, createWorkRepository, getCeilings, getTemporaryDirectory, indexState, recursiveDelete, runHook, tearDown, tick, write, writepublic void testCheckoutNonExistingBranch()
throws Exception
Exceptionpublic void testCheckoutNewBranchThatAlreadyExists()
throws Exception
Exceptionpublic void testCheckoutNewBranchOnBranchToBeBorn()
throws Exception
Exceptionpublic void testCheckoutUnresolvedHead()
throws Exception
Exceptionpublic void testCheckoutExistingBranchWithConflict()
throws Exception
Exceptionpublic void testCheckoutWithMissingWorkingTreeFile()
throws Exception
The working tree should contain 'a' with FileMode.REGULAR_FILE after the checkout.
Exceptionpublic void fileModeTestMissingThenFolderWithFileInWorkingTree()
throws Exception
The checkout has to delete folder but the workingtree contains a dirty file at this path. The checkout should fail like in native git.
Exceptionpublic void fileModeTestFolderWithMissingInWorkingTree()
throws Exception
The working tree should contain 'a' with FileMode.REGULAR_FILE after the checkout.
Exceptionpublic void fileModeTestMissingWithFolderInWorkingTree()
throws Exception
The checkout command should raise an error. The conflicting paths are 'a' and 'a/c'.
Exceptionpublic void fileModeTestFolderThenMissingWithFileInWorkingTree()
throws Exception
The checkout command should raise an error. The conflicting path is 'a'.
Exceptionpublic void fileModeTestFolderThenFileWithMissingInWorkingTree()
throws Exception
The working tree should contain 'a' with FileMode.TREE after the checkout.
Exceptionpublic void fileModeTestFileThenFileWithFolderInIndex()
throws Exception
The checkout command should raise an error. The conflicting path is 'a'.
Exceptionpublic void fileModeTestFileWithFolderInIndex()
throws Exception
The checkout command should raise an error. The conflicting paths are 'a' and 'a/c'.
ExceptionCopyright © 2017 Eclipse JGit Project. All rights reserved.