Esempio n. 1
0
  /** Testet die Method {@link org.log.datas.LogDataFactory#messageNoOut(String, String)}. */
  @Test
  public void testMessageNoOut() {
    _data = LogDataFactory.messageNoOut(_message, _error);

    assertThat(_data.getMessage(), is(_message));
    assertThat(_data.getError(), is(_error));
    assertThat(_data.getOut(), is(LogData.NO_OUT));
  }
Esempio n. 2
0
  /** Testet die Methode {@link org.log.datas.LogDataFactory#messageWarning(String, String)}. */
  @Test
  public void testMessageWarning() {
    _data = LogDataFactory.messageWarning(_message, _error);

    assertThat(_data.getMessage(), is(_message));
    assertThat(_data.getError(), is(_error));
    assertThat(_data.getOut(), is(LogData.WARNING));
  }
Esempio n. 3
0
  /**
   * Testet die Methode {@link org.log.datas.LogDataFactory#messageDatabaseInsert(String,
   * Exception)}.
   */
  @Test
  public void testMessageDatabaseInsert() {
    _data = LogDataFactory.messageDatabaseInsert(_message, _error);

    assertThat(_data.getMessage(), is(_message));
    assertThat(_data.getError(), is(_error));
    assertThat(_data.getOut(), is(LogData.DATABASE_INSERT));
  }
Esempio n. 4
0
  /** Testet die Methode {@link org.log.datas.LogDataFactory#message(String, Exception)}. */
  @Test
  public void testMessageStackTrace() {
    Exception exception = new Exception();
    _data = LogDataFactory.message(_message, exception);

    assertThat(_data.getMessage(), is(_message));
    assertThat(_data.getError(), is(LogData.createError(exception)));
    assertThat(_data.getOut(), is(LogData.NONE));
  }
Esempio n. 5
0
  /**
   * Testet die Methode {@link org.log.datas.LogDataFactory#messageDatabaseInsert(String,
   * Exception)}.
   */
  @Test
  public void testMessageDatabaseInsertStackTrace() {
    Exception exception = new Exception();

    _data = LogDataFactory.messageDatabaseInsert(_message, exception);

    assertThat(_data.getMessage(), is(_message));
    assertThat(_data.getError(), is(LogData.createError(exception)));
    assertThat(_data.getOut(), is(LogData.DATABASE_INSERT));
  }