use of com.facebook.buck.testutil.integration.TestContext in project buck by facebook.
the class WebServerBuckEventListenerTest method hasBuckProjectGenerationStartedThenEventsCalled.
@Test
@Ignore
public void hasBuckProjectGenerationStartedThenEventsCalled() throws IOException, InterruptedException {
final ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, "buck_events", tmp);
workspace.setUp();
WebServerBuckEventListener webServerBuckEventListener = createMock(WebServerBuckEventListener.class);
//Parse started
webServerBuckEventListener.parseStarted(anyObject(ParseEvent.Started.class));
EasyMock.expectLastCall().times(1);
//Parse progress Event
webServerBuckEventListener.parsingProgressUpdated(anyObject(ProgressEvent.ParsingProgressUpdated.class));
EasyMock.expectLastCall().atLeastOnce();
//Parse finished
webServerBuckEventListener.parseFinished(anyObject(ParseEvent.Finished.class));
EasyMock.expectLastCall().times(1);
//Project generation started
webServerBuckEventListener.projectGenerationStarted(anyObject(ProjectGenerationEvent.Started.class));
EasyMock.expectLastCall().times(1);
//Project generation finished
webServerBuckEventListener.projectGenerationFinished(anyObject(ProjectGenerationEvent.Finished.class));
EasyMock.expectLastCall().times(1);
//Output trace
webServerBuckEventListener.outputTrace(anyObject(BuildId.class));
EasyMock.expectLastCall().times(1);
EasyMock.replay(webServerBuckEventListener);
ProjectWorkspace.ProcessResult build = workspace.runBuckdCommand(new TestContext(), "project", "//:foo");
build.assertSuccess();
verify(webServerBuckEventListener);
}
Aggregations