示例#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));
  }
示例#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));
  }
示例#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));
  }
示例#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));
  }
示例#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));
  }