MCPcopy Index your code
hub / github.com/ccxt/ccxt / Assert

Method Assert

java/tests/src/main/java/tests/BaseTest.java:65–85  ·  view source on GitHub ↗
(Object condition2, Object message2)

Source from the content-addressed store, hash-verified

63 }
64
65 public static void Assert(Object condition2, Object message2) {
66 boolean condition = true;
67
68 if (condition2 == null) {
69 condition = false;
70 } else if (condition2 instanceof Boolean) {
71 condition = (Boolean) condition2;
72 }
73
74 String message = (message2 != null) ? message2.toString() : null;
75
76 if (!condition) {
77 String errorMessage = "Assertion failed";
78 if (message != null) {
79 errorMessage += ": " + message;
80 } else {
81 // errorMessage += ".";
82 }
83 throw new RuntimeException(errorMessage);
84 }
85 }
86
87 public static void Assert(Object condition2) {
88 Assert(condition2, null);

Callers 15

AssertDeepEqualMethod · 0.95
AssertFunction · 0.80
testFetchOrderBooksMethod · 0.80
testLoadMarketsMethod · 0.80
testTickerMethod · 0.80
testFetchOHLCVMethod · 0.80
testCurrencyMethod · 0.80
testMarketMethod · 0.80
testFetchPositionsMethod · 0.80
testStatusMethod · 0.80
testFetchLiquidationsMethod · 0.80

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected