/** * Initialized method for cucumber tests/scenarios annotated with {@code @FileSystemReposOnly}; * runs after {@link #before()} and replaces the {@link TestRepoURIBuilder} potentially * overwritten by another steps definition class by the default one that sets up {@code file://} * URI's. */ @cucumber.api.java.Before(value = "@FileSystemReposOnly", order = 2) public void beforeFileOnlyTest() throws Throwable { // force using file based repos only CLIContextProvider provider = CLIContextProvider.get(); provider.setURIBuilder(TestRepoURIBuilder.createDefault()); }
@cucumber.api.java.Before public void before() throws Exception { if (TestRepoURIBuilderProvider.getURIBuilder() == null) { TestRepoURIBuilderProvider.setURIBuilder(TestRepoURIBuilder.createDefault()); } // before each Scenario, clear out the opened repository set openedRepos.clear(); context.before(); }
/** * Initialized method for cucumber tests/scenarios annotated with {@code @FileSystemReposOnly}; * runs after {@link #before()} and replaces the {@link TestRepoURIBuilder} potentially * overwritten by another steps definition class by the default one that sets up {@code file://} * URI's. */ @cucumber.api.java.Before(value = "@FileSystemReposOnly", order = 2) public void beforeFileOnlyTest() throws Throwable { // force using file based repos only CLIContextProvider provider = CLIContextProvider.get(); provider.setURIBuilder(TestRepoURIBuilder.createDefault()); }
/** * Initialized method for cucumber tests/scenarios annotated with {@code @FileSystemReposOnly}; * runs after {@link #before()} and replaces the {@link TestRepoURIBuilder} potentially * overwritten by another steps definition class by the default one that sets up {@code file://} * URI's. */ @cucumber.api.java.Before(value = "@FileSystemReposOnly", order = 2) public void beforeFileOnlyTest() throws Throwable { // force using file based repos only CLIContextProvider provider = CLIContextProvider.get(); provider.setURIBuilder(TestRepoURIBuilder.createDefault()); }
@cucumber.api.java.Before(order = 1000) // order = 1000 to make sure it runs the latest if the // @Before annotated methods public void before(Scenario scenario) throws Throwable { contextProvider = CLIContextProvider.get(); if (contextProvider.getURIBuilder() == null) { contextProvider.setURIBuilder(TestRepoURIBuilder.createDefault()); } LOG.info("'{}': Using URIBuilder {}", scenario.getName(), contextProvider.getURIBuilder().getClass().getSimpleName()); contextProvider.before(); this.localRepo = contextProvider.getOrCreateRepositoryContext("localrepo"); RevFeatureType rft = RevFeatureTypeBuilder.build(TestFeatures.pointsType); setVariable("@PointsTypeID", rft.getId().toString()); rft = RevFeatureTypeBuilder.build(TestFeatures.linesType); setVariable("@LinesTypeID", rft.getId().toString()); }
@cucumber.api.java.Before(order = 1000) // order = 1000 to make sure it runs the latest if the // @Before annotated methods public void before(Scenario scenario) throws Throwable { contextProvider = CLIContextProvider.get(); if (contextProvider.getURIBuilder() == null) { contextProvider.setURIBuilder(TestRepoURIBuilder.createDefault()); } LOG.info("'{}': Using URIBuilder {}", scenario.getName(), contextProvider.getURIBuilder().getClass().getSimpleName()); contextProvider.before(); this.localRepo = contextProvider.getOrCreateRepositoryContext("localrepo"); RevFeatureType rft = RevFeatureTypeBuilder.build(TestFeatures.pointsType); setVariable("@PointsTypeID", rft.getId().toString()); rft = RevFeatureTypeBuilder.build(TestFeatures.linesType); setVariable("@LinesTypeID", rft.getId().toString()); }
@cucumber.api.java.Before(order = 1000) // order = 1000 to make sure it runs the latest if the // @Before annotated methods public void before(Scenario scenario) throws Throwable { contextProvider = CLIContextProvider.get(); if (contextProvider.getURIBuilder() == null) { contextProvider.setURIBuilder(TestRepoURIBuilder.createDefault()); } LOG.info("'{}': Using URIBuilder {}", scenario.getName(), contextProvider.getURIBuilder().getClass().getSimpleName()); contextProvider.before(); this.localRepo = contextProvider.getOrCreateRepositoryContext("localrepo"); RevFeatureType rft = RevFeatureType.builder().type(TestFeatures.pointsType).build(); setVariable("@PointsTypeID", rft.getId().toString()); rft = RevFeatureType.builder().type(TestFeatures.linesType).build(); setVariable("@LinesTypeID", rft.getId().toString()); }