package com.sap.olingo.jpa.processor.core.processor;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import com.sap.olingo.jpa.processor.core.api.JPAServiceDebugger.JPARuntimeMeasurement;

class JPAEmptyDebuggerTest {

  JPAEmptyDebugger cut;

  @BeforeEach
  void setup() {
    cut = new JPAEmptyDebugger();
  }

  @Test
  void testMeasurementCreated() {
    try (JPARuntimeMeasurement measurement = cut.newMeasurement(cut, "firstTest")) {
      assertEquals(0L, measurement.getMemoryConsumption());
    }
    assertTrue(cut.getRuntimeInformation().isEmpty());
  }

}
