<?php
//
// WARNING: Do not edit by hand, this file was generated by Crank:
// https://github.com/gocardless/crank
//

namespace GoCardlessPro\Integration;

class BankDetailsLookupsIntegrationTest extends IntegrationTestBase
{
    public function testResourceModelExists()
    {
        $obj = new \GoCardlessPro\Resources\BankDetailsLookup(array());
        $this->assertNotNull($obj);
    }
    
    public function testBankDetailsLookupsCreate()
    {
        $fixture = $this->loadJsonFixture('bank_details_lookups')->create;
        $this->stub_request($fixture);

        $service = $this->client->bankDetailsLookups();
        $response = call_user_func_array(array($service, 'create'), (array)$fixture->url_params);

        $body = $fixture->body->bank_details_lookups;
    
        $this->assertInstanceOf('\GoCardlessPro\Resources\BankDetailsLookup', $response);

        $this->assertEquals($body->available_debit_schemes, $response->available_debit_schemes);
        $this->assertEquals($body->bank_name, $response->bank_name);
        $this->assertEquals($body->bic, $response->bic);
    

        $expectedPathRegex = $this->extract_resource_fixture_path_regex($fixture);
        $dispatchedRequest = $this->history[0]['request'];
        $this->assertMatchesRegularExpression($expectedPathRegex, $dispatchedRequest->getUri()->getPath());
    }

    
}
