init svn repositories with README.md in trunk folder

This commit is contained in:
Eduard Heimbuch
2020-07-22 14:00:52 +02:00
parent 9a1ec7a5ef
commit b1660f5ec7
8 changed files with 47 additions and 9 deletions

View File

@@ -101,6 +101,22 @@ public class SvnModifyCommandTest extends AbstractSvnCommandTestBase {
assertThat(new File(workingCopy.getWorkingRepository(), "Test123")).exists();
}
@Test
public void shouldAddNewFileInDefaultPath() throws IOException {
File testfile = temporaryFolder.newFile("Test123");
ModifyCommandRequest request = new ModifyCommandRequest();
request.setDefaultPath(true);
request.addRequest(new ModifyCommandRequest.CreateFileRequest("Test123", testfile, false));
request.setCommitMessage("this is great");
request.setAuthor(new Person("Arthur Dent", "dent@hitchhiker.com"));
svnModifyCommand.execute(request);
WorkingCopy<File, File> workingCopy = workingCopyFactory.createWorkingCopy(context, null);
assertThat(new File(workingCopy.getWorkingRepository(), "trunk/Test123")).exists();
}
@Test
public void shouldThrowFileAlreadyExistsException() throws IOException {
File testfile = temporaryFolder.newFile("a.txt");