<?php
namespace ccxt;

// ----------------------------------------------------------------------------

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code

// -----------------------------------------------------------------------------
include_once PATH_TO_CCXT . '/test/exchange/base/test_shared_methods.php';

function test_borrow_interest($exchange, $skipped_properties, $method, $entry, $requested_code, $requested_symbol) {
    $format = array(
        'info' => array(),
        'account' => 'BTC/USDT',
        'currency' => 'USDT',
        'interest' => $exchange->parse_number('0.1444'),
        'interestRate' => $exchange->parse_number('0.0006'),
        'amountBorrowed' => $exchange->parse_number('30.0'),
        'timestamp' => 1638230400000,
        'datetime' => '2021-11-30T00:00:00.000Z',
    );
    $empty_allowed_for = ['account'];
    assert_structure($exchange, $skipped_properties, $method, $entry, $format, $empty_allowed_for);
    assert_timestamp_and_datetime($exchange, $skipped_properties, $method, $entry);
    assert_currency_code($exchange, $skipped_properties, $method, $entry, $entry['currency'], $requested_code);
    assert_symbol($exchange, $skipped_properties, $method, $entry, $entry['account'], $requested_symbol);
    assert_greater($exchange, $skipped_properties, $method, $entry, 'interest', '0');
    assert_greater($exchange, $skipped_properties, $method, $entry, 'interestRate', '0');
    assert_greater($exchange, $skipped_properties, $method, $entry, 'amountBorrowed', '0');
}
