@Test public void runQuietly() { Configuration config = Configuration.create(); Server server = mock(Server.class); when(server.version()).thenReturn(Version.create("5.6")); Build build = mock(Build.class); when(build.execute(any(Configuration.class), anyMap())).thenReturn(new BuildResult().addStatus(2)); BuildRunner runner = new BuildRunner(config); BuildResult result = runner.runQuietly(server, build); assertThat(result.getLastStatus()).isEqualTo(2); assertThat(result.getStatuses()).containsExactly(2); }
public BuildResult runQuietly(@Nullable Server server, Build<?> build) { return build.execute(config, adjustProperties(server, build)); }
BuildRunner { public BuildResult runQuietly(@Nullable Server server, Build<?> build) { return build.execute(config, adjustProperties(server, build)); } }
BuildRunner { public BuildResult runQuietly(@Nullable Server server, Build<?> build) { return build.execute(config, adjustProperties(server, build)); } BuildRunner(Configuration config); }
BuildRunner { public BuildResult runQuietly(@Nullable Server server, Build<?> build) { return build.execute(config, adjustProperties(server, build)); } BuildRunner(Configuration config); BuildResult runQuietly(@Nullable Server server, Build<?> build); BuildResult run(@Nullable Server server, Build<?> build); }
BuildRunner { public BuildResult runQuietly(@Nullable Server server, Build<?> build) { return build.execute(config, adjustProperties(server, build)); } BuildRunner(Configuration config); BuildResult runQuietly(@Nullable Server server, Build<?> build); BuildResult run(@Nullable Server server, Build<?> build); static final String SONAR_HOST_URL; }