public class TimerRepresentationTest extends Object
TimerRepresentation.| Modifier and Type | Field and Description |
|---|---|
private static double |
DAYS |
private static String |
FOLDER |
private static double |
HOURS |
private static String |
JSON_CLEAN |
private static String |
JSON_INVALID_BASE_UNIT |
private static String |
JSON_INVALID_FOUR_MEASUREMENTS |
private static String |
JSON_INVALID_TWO_COUNT |
private static String |
JSON_INVALID_TWO_MAX |
private static String |
JSON_INVALID_TWO_MEASUREMENTS |
private static String |
JSON_INVALID_TWO_TOTAL |
private static String |
JSON_INVALID_WRONG_STATISTIC |
private static String |
JSON_SINGLE |
private static String |
JSON_VALID |
private static double |
MICROS |
private static double |
MILLIS |
private static double |
MINUTES |
private static double |
NANOS |
private static double |
SECONDS |
| Constructor and Description |
|---|
TimerRepresentationTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testGetUpdater()
Tests
TimerRepresentation.getUpdater(). |
void |
testInitBadFourMeasurements()
Tests
TimerRepresentation.parseTimer(JsonObject, String...). |
void |
testInitBadInvalidBaseUnit()
Tests
TimerRepresentation.parseTimer(JsonObject, String...). |
void |
testInitBadTwoCount()
Tests
TimerRepresentation.parseTimer(JsonObject, String...). |
void |
testInitBadTwoMax()
Tests
TimerRepresentation.parseTimer(JsonObject, String...). |
void |
testInitBadTwoMeasurements()
Tests
TimerRepresentation.parseTimer(JsonObject, String...). |
void |
testInitBadTwoTotal()
Tests
TimerRepresentation.parseTimer(JsonObject, String...). |
void |
testInitBadWrongStatistic()
Tests
TimerRepresentation.parseTimer(JsonObject, String...). |
void |
testInitOkNoTags()
Tests
TimerRepresentation.parseTimer(JsonObject, String...). |
void |
testInitOkWithTags()
Tests
TimerRepresentation.parseTimer(JsonObject, String...). |
void |
testMaxTimeConversion()
Tests
TimerRepresentation.max(TimeUnit). |
void |
testMeasure()
Tests
TimerRepresentation.measure(). |
void |
testNameInitOk()
Tests
TimerRepresentation.createNewTimer(String). |
void |
testRecordCallable()
Tests
TimerRepresentation.recordCallable(java.util.concurrent.Callable). |
void |
testRecordLong()
Tests
TimerRepresentation.count(), TimerRepresentation.totalTime(TimeUnit) and
TimerRepresentation.max(TimeUnit). |
void |
testRecordRunnable()
Tests
TimerRepresentation.record(Runnable). |
void |
testRecordSupplier()
Tests
TimerRepresentation.record(java.util.function.Supplier). |
void |
testTakeSnapshot()
Tests
TimerRepresentation.takeSnapshot(). |
void |
testTotalTimeConversion()
Tests
TimerRepresentation.totalTime(TimeUnit). |
private static final String FOLDER
private static final String JSON_VALID
private static final String JSON_CLEAN
private static final String JSON_SINGLE
private static final String JSON_INVALID_BASE_UNIT
private static final String JSON_INVALID_TWO_MEASUREMENTS
private static final String JSON_INVALID_FOUR_MEASUREMENTS
private static final String JSON_INVALID_WRONG_STATISTIC
private static final String JSON_INVALID_TWO_COUNT
private static final String JSON_INVALID_TWO_TOTAL
private static final String JSON_INVALID_TWO_MAX
private static final double NANOS
private static final double MICROS
private static final double MILLIS
private static final double SECONDS
private static final double MINUTES
private static final double HOURS
private static final double DAYS
public void testInitOkNoTags()
throws IOException
TimerRepresentation.parseTimer(JsonObject, String...).IOException - shall not occur when test is passedpublic void testInitOkWithTags()
throws IOException
TimerRepresentation.parseTimer(JsonObject, String...).IOException - shall not occur when test is passedpublic void testInitBadInvalidBaseUnit()
throws IOException
TimerRepresentation.parseTimer(JsonObject, String...).IOException - shall not occur when test is passedpublic void testInitBadTwoMeasurements()
throws IOException
TimerRepresentation.parseTimer(JsonObject, String...).IOException - shall not occur when test is passedpublic void testInitBadFourMeasurements()
throws IOException
TimerRepresentation.parseTimer(JsonObject, String...).IOException - shall not occur when test is passedpublic void testInitBadWrongStatistic()
throws IOException
TimerRepresentation.parseTimer(JsonObject, String...).IOException - shall not occur when test is passedpublic void testInitBadTwoCount()
throws IOException
TimerRepresentation.parseTimer(JsonObject, String...).IOException - shall not occur when test is passedpublic void testInitBadTwoTotal()
throws IOException
TimerRepresentation.parseTimer(JsonObject, String...).IOException - shall not occur when test is passedpublic void testInitBadTwoMax()
throws IOException
TimerRepresentation.parseTimer(JsonObject, String...).IOException - shall not occur when test is passedpublic void testTakeSnapshot()
throws IOException
TimerRepresentation.takeSnapshot().IOException - shall not occur when test is passedpublic void testRecordLong()
throws IOException
TimerRepresentation.count(), TimerRepresentation.totalTime(TimeUnit) and
TimerRepresentation.max(TimeUnit).IOException - shall not occur when test is passedpublic void testRecordSupplier()
throws IOException
TimerRepresentation.record(java.util.function.Supplier).IOException - shall not occur when test is passedpublic void testRecordCallable()
throws Exception
TimerRepresentation.recordCallable(java.util.concurrent.Callable).Exception - shall not occur when test is passedpublic void testRecordRunnable()
throws IOException
TimerRepresentation.record(Runnable).IOException - shall not occur when test is passedpublic void testTotalTimeConversion()
throws IOException
TimerRepresentation.totalTime(TimeUnit).IOException - shall not occur when test is passedpublic void testMaxTimeConversion()
throws IOException
TimerRepresentation.max(TimeUnit).IOException - shall not occur when test is passedpublic void testGetUpdater()
throws Exception
TimerRepresentation.getUpdater().Exception - shall not occur when test is passedpublic void testMeasure()
throws IOException
TimerRepresentation.measure().IOException - shall not occur when test is passedpublic void testNameInitOk()
TimerRepresentation.createNewTimer(String).Copyright © 2022. All rights reserved.