.setOrphan(orphan).setAutoCheckout(checkout).setSource(origin).call();
.setOrphan(orphan).setAutoCheckout(checkout).setSource(origin).call();
.setOrphan(orphan).setAutoCheckout(checkout).setSource(origin).call();
@Test public void testCreateSchemaOnBranch() throws IOException { final String branchName = "testBranch"; geogig.command(BranchCreateOp.class).setName(branchName).setOrphan(true).call(); dataStore.setHead(branchName); final SimpleFeatureType featureType = super.linesType; dataStore.createSchema(featureType); List<String> typeNames; typeNames = getTypeNames(Ref.HEAD); assertTrue(typeNames.isEmpty()); typeNames = getTypeNames(branchName); assertEquals(1, typeNames.size()); assertEquals(linesName, typeNames.get(0)); dataStore.createSchema(super.pointsType); typeNames = getTypeNames(Ref.HEAD); assertTrue(typeNames.isEmpty()); typeNames = getTypeNames(branchName); assertEquals(2, typeNames.size()); assertTrue(typeNames.contains(linesName)); assertTrue(typeNames.contains(pointsName)); }
@Test public void testCreateSchemaOnBranch() throws IOException { final String branchName = "testBranch"; geogig.command(BranchCreateOp.class).setName(branchName).setOrphan(true).call(); dataStore.setHead(branchName); final SimpleFeatureType featureType = super.linesType; dataStore.createSchema(featureType); List<String> typeNames; typeNames = getTypeNames(Ref.HEAD); assertTrue(typeNames.isEmpty()); typeNames = getTypeNames(branchName); assertEquals(1, typeNames.size()); assertEquals(linesName, typeNames.get(0)); dataStore.createSchema(super.pointsType); typeNames = getTypeNames(Ref.HEAD); assertTrue(typeNames.isEmpty()); typeNames = getTypeNames(branchName); assertEquals(2, typeNames.size()); assertTrue(typeNames.contains(linesName)); assertTrue(typeNames.contains(pointsName)); }
.setAutoCheckout(autoCheckout).setForce(force).setOrphan(orphan) .setSource(source).call(); context.setResponseContent(new CommandResponse() {
@Test public void testOrphan() throws Exception { insertAndAdd(points1); geogig.command(CommitOp.class).setMessage("Commit1").call(); Ref branch1 = geogig.command(BranchCreateOp.class).setName("branch1").setAutoCheckout(true) .setOrphan(true).call(); assertEquals(ObjectId.NULL, branch1.getObjectId()); assertEquals(Ref.HEADS_PREFIX + "branch1", branch1.getName()); } }
@Test public void testOrphan() throws Exception { insertAndAdd(points1); geogig.command(CommitOp.class).setMessage("Commit1").call(); Ref branch1 = geogig.command(BranchCreateOp.class).setName("branch1").setAutoCheckout(true) .setOrphan(true).call(); assertEquals(ObjectId.NULL, branch1.getObjectId()); assertEquals(Ref.HEADS_PREFIX + "branch1", branch1.getName()); } }