use of org.eclipse.egit.gitflow.op.InitOperation in project egit by eclipse.
the class BranchNameValidatorTest method testBranchNotExists.
@Test
public void testBranchNotExists() throws Exception {
testRepository.createInitialCommit("testInitOperation\n\nfirst commit\n");
Repository repository = testRepository.getRepository();
new InitOperation(repository).execute(null);
GitFlowRepository gfRepo = new GitFlowRepository(repository);
new ReleaseStartOperation(gfRepo, MY_RELEASE).execute(null);
assertFalse(releaseExists(gfRepo, "notThere"));
}
use of org.eclipse.egit.gitflow.op.InitOperation in project egit by eclipse.
the class BranchNameValidatorTest method testReleaseExists.
@Test
public void testReleaseExists() throws Exception {
testRepository.createInitialCommit("testInitOperation\n\nfirst commit\n");
Repository repository = testRepository.getRepository();
new InitOperation(repository).execute(null);
GitFlowRepository gfRepo = new GitFlowRepository(repository);
new ReleaseStartOperation(gfRepo, MY_RELEASE).execute(null);
assertTrue(releaseExists(gfRepo, MY_RELEASE));
}
use of org.eclipse.egit.gitflow.op.InitOperation in project egit by eclipse.
the class GitFlowRepositoryTest method testGetReleaseBranches.
@Test
public void testGetReleaseBranches() throws Exception {
repository1.createInitialCommit("testGetReleaseBranches\n\nfirst commit\n");
Repository repository = repository1.getRepository();
GitFlowRepository gfRepo = new GitFlowRepository(repository);
new InitOperation(repository).execute(null);
assertTrue(gfRepo.getReleaseBranches().isEmpty());
new ReleaseStartOperation(gfRepo, MY_RELEASE).execute(null);
assertEquals(R_HEADS + gfRepo.getConfig().getReleasePrefix() + MY_RELEASE, gfRepo.getReleaseBranches().get(0).getName());
}
use of org.eclipse.egit.gitflow.op.InitOperation in project egit by eclipse.
the class GitFlowRepositoryTest method testGetHotfixBranches.
@Test
public void testGetHotfixBranches() throws Exception {
repository1.createInitialCommit("testGetHotfixBranches\n\nfirst commit\n");
Repository repository = repository1.getRepository();
GitFlowRepository gfRepo = new GitFlowRepository(repository);
new InitOperation(repository).execute(null);
assertTrue(gfRepo.getHotfixBranches().isEmpty());
new ReleaseStartOperation(gfRepo, MY_RELEASE).execute(null);
new ReleaseFinishOperation(gfRepo, MY_RELEASE).execute(null);
new HotfixStartOperation(gfRepo, MY_HOTFIX).execute(null);
assertEquals(R_HEADS + gfRepo.getConfig().getHotfixPrefix() + MY_HOTFIX, gfRepo.getHotfixBranches().get(0).getName());
}
use of org.eclipse.egit.gitflow.op.InitOperation in project egit by eclipse.
the class GitFlowRepositoryTest method testIsMaster.
@Test
public void testIsMaster() throws Exception {
repository1.createInitialCommit("testIsMaster\n\nfirst commit\n");
Repository repository = repository2.getRepository();
GitFlowRepository gfRepo = new GitFlowRepository(repository);
assertTrue(gfRepo.isMaster());
new InitOperation(repository).execute(null);
assertFalse(gfRepo.isMaster());
}
Aggregations