Package be.klak.junit.jasmine

Examples of be.klak.junit.jasmine.JasmineTestRunner


  @Mock
  private RunNotifier notifierMock;

  @Test
  public void useJasmineRunnerOnJasmineTestRunnerBeforeAndAfterClass() {
    new JasmineTestRunner(JasmineTestRunnerBeforeAndAfterClass.class).run(notifierMock);
  }
View Full Code Here


    }

    @Test
    public void byDefaultDoNotGenerateJasmineTestRunner() {
        Class<JasmineSuiteGeneratorClassWithoutRunner> testClass = JasmineSuiteGeneratorClassWithoutRunner.class;
        new JasmineTestRunner(testClass).run(notifierMock);

        File runnerResult = getTestRunnerResultFile(testClass);
        assertThat(runnerResult.isFile()).isFalse();
    }
View Full Code Here

    }

    @Test
    public void generateJasmineTestRunnerAfterRunningTests() throws IOException {
        Class<JasmineSuiteGeneratorClassWithRunner> testClass = JasmineSuiteGeneratorClassWithRunner.class;
        new JasmineTestRunner(testClass).run(notifierMock);

        File runnerResult = getTestRunnerResultFile(testClass);
        assertThat(runnerResult.isFile()).isTrue();

        String runnerContent = FileUtils.readFileToString(runnerResult);
View Full Code Here

    @Test
    public void generateJasmineTestRunnerAfterRunningTestsWithSubDir() throws IOException {
      Class<JasmineSuiteGeneratorClassWithRunnerInSubDir> testClass =
        JasmineSuiteGeneratorClassWithRunnerInSubDir.class;
      new JasmineTestRunner(testClass).run(notifierMock);

      File runnerResult = getTestRunnerResultFile(testClass, "subDir1/subDir2");
      assertThat(runnerResult.isFile()).isTrue();

      String runnerContent = FileUtils.readFileToString(runnerResult);
View Full Code Here

    @Mock
    private RunNotifier notifierMock;

    @Test
    public void shouldNotifyOfSingleSuccess() {
        new JasmineTestRunner(JasmineTestRunnerSuccessSpec.class).run(notifierMock);

        ArgumentCaptor<Description> descriptionStartedCaptor = ArgumentCaptor.forClass(Description.class);
        ArgumentCaptor<Description> descriptionFinishedCaptor = ArgumentCaptor.forClass(Description.class);
        verify(notifierMock).fireTestStarted(descriptionStartedCaptor.capture());
        verify(notifierMock).fireTestFinished(descriptionFinishedCaptor.capture());
View Full Code Here

        assertThat(startedDescription.getDisplayName()).isEqualTo("will always run");
    }

    @Test
    public void doesNotLoadEnvJsWhenSoConfigured() {
        new JasmineTestRunner(JasmineTestRunnerDoesNotLoadEnvJS.class).run(notifierMock);

        ArgumentCaptor<Description> descriptionStartedCaptor = ArgumentCaptor.forClass(Description.class);
        ArgumentCaptor<Description> descriptionFinishedCaptor = ArgumentCaptor.forClass(Description.class);
        verify(notifierMock).fireTestStarted(descriptionStartedCaptor.capture());
        verify(notifierMock).fireTestFinished(descriptionFinishedCaptor.capture());
View Full Code Here

TOP

Related Classes of be.klak.junit.jasmine.JasmineTestRunner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.