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

Method startTest

java/tests/src/main/java/tests/exchange/TestMain.java:1036–1084  ·  view source on GitHub ↗
(Exchange exchange, Object symbolArgv)

Source from the content-addressed store, hash-verified

1034 }
1035
1036 public java.util.concurrent.CompletableFuture<Object> startTest(Exchange exchange, Object symbolArgv)
1037 {
1038
1039 return java.util.concurrent.CompletableFuture.supplyAsync(() -> {
1040
1041 // we do not need to test aliases
1042 if (Helpers.isTrue(exchange.alias))
1043 {
1044 return true;
1045 }
1046 this.checkConstructor(exchange);
1047 // await this.testReturnResponseHeaders (exchange);
1048 if (Helpers.isTrue(Helpers.isTrue(this.sandbox) || Helpers.isTrue(getExchangeProp(exchange, "sandbox"))))
1049 {
1050 exchange.setSandboxMode(true);
1051 }
1052 this.testHasProps(exchange);
1053 try
1054 {
1055 Object result = (this.loadExchange(exchange)).join();
1056 if (!Helpers.isTrue(result))
1057 {
1058 if (!Helpers.isTrue(isSync()))
1059 {
1060 (close(exchange)).join();
1061 }
1062 return true;
1063 }
1064 // if (exchange.id === 'binance') {
1065 // // we test proxies functionality just for one random exchange on each build, because proxy functionality is not exchange-specific, instead it's all done from base methods, so just one working sample would mean it works for all ccxt exchanges
1066 // // await this.testProxies (exchange);
1067 // }
1068 (this.testExchange(exchange, symbolArgv)).join();
1069 if (!Helpers.isTrue(isSync()))
1070 {
1071 (close(exchange)).join();
1072 }
1073 } catch(Exception e)
1074 {
1075 if (!Helpers.isTrue(isSync()))
1076 {
1077 (close(exchange)).join();
1078 }
1079 throw new RuntimeException(e);
1080 }
1081 return true; // required in c#
1082 });
1083
1084 }
1085
1086 public void testHasProps(Exchange exchange)
1087 {

Callers 1

initInnerMethod · 0.95

Calls 9

isTrueMethod · 0.95
checkConstructorMethod · 0.95
testHasPropsMethod · 0.95
loadExchangeMethod · 0.95
testExchangeMethod · 0.95
getExchangePropMethod · 0.80
isSyncMethod · 0.80
setSandboxModeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected