Exemplo 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));
  }
Exemplo 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));
  }
Exemplo 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));
  }
Exemplo 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));
  }
Exemplo 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));
  }