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

Method checkConstructor

java/tests/src/main/java/tests/exchange/TestMain.java:998–1011  ·  view source on GitHub ↗
(Exchange exchange)

Source from the content-addressed store, hash-verified

996 }
997
998 public void checkConstructor(Exchange exchange)
999 {
1000 // todo: this might be moved in base tests later
1001 if (Helpers.isTrue(Helpers.isEqual(exchange.id, "binance")))
1002 {
1003 Assert(Helpers.isTrue(Helpers.isEqual(exchange.hostname, null)) || Helpers.isTrue(Helpers.isEqual(exchange.hostname, "")), "binance.com hostname should be empty");
1004 Assert(Helpers.isEqual(Helpers.GetValue(Helpers.GetValue(exchange.urls, "api"), "public"), "https://api.binance.com/api/v3"), Helpers.add("https://api.binance.com/api/v3 does not match: ", Helpers.GetValue(Helpers.GetValue(exchange.urls, "api"), "public")));
1005 Assert((Helpers.inOp(Helpers.GetValue(Helpers.GetValue(exchange.api, "sapi"), "get"), "lending/union/account")), Helpers.add("SAPI should contain the endpoint lending/union/account, ", jsonStringify(Helpers.GetValue(Helpers.GetValue(exchange.api, "sapi"), "get"))));
1006 } else if (Helpers.isTrue(Helpers.isEqual(exchange.id, "binanceus")))
1007 {
1008 Assert(Helpers.isEqual(exchange.hostname, "binance.us"), Helpers.add("binance.us hostname does not match ", exchange.hostname));
1009 Assert(Helpers.isEqual(Helpers.GetValue(Helpers.GetValue(exchange.urls, "api"), "public"), "https://api.binance.us/api/v3"), Helpers.add("https://api.binance.us/api/v3 does not match: ", Helpers.GetValue(Helpers.GetValue(exchange.urls, "api"), "public")));
1010 }
1011 }
1012
1013 public java.util.concurrent.CompletableFuture<Object> testReturnResponseHeaders(Exchange exchange)
1014 {

Callers 1

startTestMethod · 0.95

Calls 7

isTrueMethod · 0.95
isEqualMethod · 0.95
GetValueMethod · 0.95
addMethod · 0.95
inOpMethod · 0.95
AssertMethod · 0.80
jsonStringifyMethod · 0.80

Tested by

no test coverage detected