mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-18 08:34:31 +00:00
comment out unused tests
This commit is contained in:
parent
94e6016f0a
commit
f92209c3a5
1 changed files with 74 additions and 74 deletions
|
@ -339,80 +339,80 @@ void main() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
group("getEstimatedFixedRateExchangeAmount", () {
|
// group("getEstimatedFixedRateExchangeAmount", () {
|
||||||
test("getEstimatedFixedRateExchangeAmount succeeds", () async {
|
// test("getEstimatedFixedRateExchangeAmount succeeds", () async {
|
||||||
final client = MockClient();
|
// final client = MockClient();
|
||||||
ChangeNow.instance.client = client;
|
// ChangeNow.instance.client = client;
|
||||||
|
//
|
||||||
when(client.get(
|
// when(client.get(
|
||||||
Uri.parse(
|
// Uri.parse(
|
||||||
"https://api.ChangeNow.io/v1/exchange-amount/fixed-rate/10/xmr_btc?api_key=testAPIKEY&useRateId=true"),
|
// "https://api.ChangeNow.io/v1/exchange-amount/fixed-rate/10/xmr_btc?api_key=testAPIKEY&useRateId=true"),
|
||||||
headers: {'Content-Type': 'application/json'},
|
// headers: {'Content-Type': 'application/json'},
|
||||||
)).thenAnswer((realInvocation) async =>
|
// )).thenAnswer((realInvocation) async =>
|
||||||
Response(jsonEncode(estFixedRateExchangeAmountJSON), 200));
|
// Response(jsonEncode(estFixedRateExchangeAmountJSON), 200));
|
||||||
|
//
|
||||||
final result =
|
// final result =
|
||||||
await ChangeNow.instance.getEstimatedFixedRateExchangeAmount(
|
// await ChangeNow.instance.getEstimatedFixedRateExchangeAmount(
|
||||||
fromTicker: "xmr",
|
// fromTicker: "xmr",
|
||||||
toTicker: "btc",
|
// toTicker: "btc",
|
||||||
fromAmount: Decimal.fromInt(10),
|
// fromAmount: Decimal.fromInt(10),
|
||||||
apiKey: "testAPIKEY",
|
// apiKey: "testAPIKEY",
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
expect(result.exception, null);
|
// expect(result.exception, null);
|
||||||
expect(result.value == null, false);
|
// expect(result.value == null, false);
|
||||||
expect(result.value.toString(),
|
// expect(result.value.toString(),
|
||||||
'EstimatedExchangeAmount: {estimatedAmount: 0.07271053, transactionSpeedForecast: 10-60, warningMessage: null, rateId: 1t2W5KBPqhycSJVYpaNZzYWLfMr0kSFe, networkFee: 0.00002408}');
|
// 'EstimatedExchangeAmount: {estimatedAmount: 0.07271053, transactionSpeedForecast: 10-60, warningMessage: null, rateId: 1t2W5KBPqhycSJVYpaNZzYWLfMr0kSFe, networkFee: 0.00002408}');
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
test(
|
// test(
|
||||||
"getEstimatedFixedRateExchangeAmount fails with ChangeNowExceptionType.serializeResponseError",
|
// "getEstimatedFixedRateExchangeAmount fails with ChangeNowExceptionType.serializeResponseError",
|
||||||
() async {
|
// () async {
|
||||||
final client = MockClient();
|
// final client = MockClient();
|
||||||
ChangeNow.instance.client = client;
|
// ChangeNow.instance.client = client;
|
||||||
|
//
|
||||||
when(client.get(
|
// when(client.get(
|
||||||
Uri.parse(
|
// Uri.parse(
|
||||||
"https://api.ChangeNow.io/v1/exchange-amount/fixed-rate/10/xmr_btc?api_key=testAPIKEY&useRateId=true"),
|
// "https://api.ChangeNow.io/v1/exchange-amount/fixed-rate/10/xmr_btc?api_key=testAPIKEY&useRateId=true"),
|
||||||
headers: {'Content-Type': 'application/json'},
|
// headers: {'Content-Type': 'application/json'},
|
||||||
)).thenAnswer((realInvocation) async => Response('{"error": 42}', 200));
|
// )).thenAnswer((realInvocation) async => Response('{"error": 42}', 200));
|
||||||
|
//
|
||||||
final result =
|
// final result =
|
||||||
await ChangeNow.instance.getEstimatedFixedRateExchangeAmount(
|
// await ChangeNow.instance.getEstimatedFixedRateExchangeAmount(
|
||||||
fromTicker: "xmr",
|
// fromTicker: "xmr",
|
||||||
toTicker: "btc",
|
// toTicker: "btc",
|
||||||
fromAmount: Decimal.fromInt(10),
|
// fromAmount: Decimal.fromInt(10),
|
||||||
apiKey: "testAPIKEY",
|
// apiKey: "testAPIKEY",
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
expect(result.exception!.type,
|
// expect(result.exception!.type,
|
||||||
ChangeNowExceptionType.serializeResponseError);
|
// ChangeNowExceptionType.serializeResponseError);
|
||||||
expect(result.value == null, true);
|
// expect(result.value == null, true);
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
test("getEstimatedFixedRateExchangeAmount fails for any other reason",
|
// test("getEstimatedFixedRateExchangeAmount fails for any other reason",
|
||||||
() async {
|
// () async {
|
||||||
final client = MockClient();
|
// final client = MockClient();
|
||||||
ChangeNow.instance.client = client;
|
// ChangeNow.instance.client = client;
|
||||||
|
//
|
||||||
when(client.get(
|
// when(client.get(
|
||||||
Uri.parse(
|
// Uri.parse(
|
||||||
"https://api.ChangeNow.io/v1/exchange-amount/fixed-rate/10/xmr_btc?api_key=testAPIKEY&useRateId=true"),
|
// "https://api.ChangeNow.io/v1/exchange-amount/fixed-rate/10/xmr_btc?api_key=testAPIKEY&useRateId=true"),
|
||||||
headers: {'Content-Type': 'application/json'},
|
// headers: {'Content-Type': 'application/json'},
|
||||||
)).thenAnswer((realInvocation) async => Response('', 400));
|
// )).thenAnswer((realInvocation) async => Response('', 400));
|
||||||
|
//
|
||||||
final result =
|
// final result =
|
||||||
await ChangeNow.instance.getEstimatedFixedRateExchangeAmount(
|
// await ChangeNow.instance.getEstimatedFixedRateExchangeAmount(
|
||||||
fromTicker: "xmr",
|
// fromTicker: "xmr",
|
||||||
toTicker: "btc",
|
// toTicker: "btc",
|
||||||
fromAmount: Decimal.fromInt(10),
|
// fromAmount: Decimal.fromInt(10),
|
||||||
apiKey: "testAPIKEY",
|
// apiKey: "testAPIKEY",
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
expect(result.exception!.type, ChangeNowExceptionType.generic);
|
// expect(result.exception!.type, ChangeNowExceptionType.generic);
|
||||||
expect(result.value == null, true);
|
// expect(result.value == null, true);
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|
||||||
group("getAvailableFixedRateMarkets", () {
|
group("getAvailableFixedRateMarkets", () {
|
||||||
test("getAvailableFixedRateMarkets succeeds", () async {
|
test("getAvailableFixedRateMarkets succeeds", () async {
|
||||||
|
|
Loading…
Reference in a new issue