Exemplo n.º 1
0
  @Test
  public void ShouldLogIntegerWithMessage() throws Exception {
    final CountDownLatch lcd = new CountDownLatch(1);
    kidozen.WriteLog("ShouldLogInteger", 365, LogLevel.LogLevelCritical, createCallback(lcd));

    assertTrue(lcd.await(TEST_TIMEOUT_IN_MINUTES, TimeUnit.MINUTES));
  }
Exemplo n.º 2
0
  @Test
  public void ShouldLogJSONObjectWithMessage() throws Exception {
    final CountDownLatch lcd = new CountDownLatch(1);
    JSONObject data = new JSONObject().put("myProperty", 128);
    kidozen.WriteLog("ShouldLogJSONObject", data, LogLevel.LogLevelCritical, createCallback(lcd));

    assertTrue(lcd.await(TEST_TIMEOUT_IN_MINUTES, TimeUnit.MINUTES));
  }
Exemplo n.º 3
0
  @Test
  public void ShouldLogStringWithMessage() throws Exception {
    final CountDownLatch lcd = new CountDownLatch(1);
    String data = "string content";
    kidozen.WriteLog("ShouldLogString", data, LogLevel.LogLevelCritical, createCallback(lcd));

    assertTrue(lcd.await(TEST_TIMEOUT_IN_MINUTES, TimeUnit.MINUTES));
  }
Exemplo n.º 4
0
  @Test
  public void ShouldLogArrayOfStrings() throws Exception {
    ArrayList<String> intArray = new ArrayList<String>();
    intArray.add("a");
    intArray.add("b");
    intArray.add("c");
    intArray.add("d");
    final CountDownLatch lcd = new CountDownLatch(1);
    kidozen.WriteLog(
        "ShouldLogArrayOfStrings", intArray, LogLevel.LogLevelCritical, createCallback(lcd));

    assertTrue(lcd.await(TEST_TIMEOUT_IN_MINUTES, TimeUnit.MINUTES));
  }
Exemplo n.º 5
0
  @Test
  public void ShouldLogDictionaryOfStrings() throws Exception {
    Map<String, String> intArray = new HashMap<String, String>();
    intArray.put("a", "1");
    intArray.put("b", "2");
    intArray.put("c", "3");
    intArray.put("d", "4");
    final CountDownLatch lcd = new CountDownLatch(1);
    kidozen.WriteLog(
        "ShouldLogDictionaryOfStrings", intArray, LogLevel.LogLevelCritical, createCallback(lcd));

    assertTrue(lcd.await(TEST_TIMEOUT_IN_MINUTES, TimeUnit.MINUTES));
  }
Exemplo n.º 6
0
  @Test
  public void ShouldWriteMessageUsingKey() throws Exception {
    final CountDownLatch lcd = new CountDownLatch(1);

    KZApplication k =
        new KZApplication(AppSettings.KZ_TENANT, AppSettings.KZ_APP, AppSettings.KZ_KEY, false);

    k.WriteLog(
        "ShouldWriteMessageUsingKey",
        "LoggingIntegrationTests",
        LogLevel.LogLevelCritical,
        createCallback(lcd));

    assertTrue(lcd.await(TEST_TIMEOUT_IN_MINUTES, TimeUnit.MINUTES));
  }