Sha256: 6deed9538561ef299ea3d6e8f171b58971976c35f9085572623ff16a36771f49
Contents?: true
Size: 1.08 KB
Versions: 33
Compression:
Stored size: 1.08 KB
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for List Express Route Circuit Peeringss Request class TestListExpressRouteCircuitPeerings < Minitest::Test def setup @service = Fog::Network::AzureRM.new(credentials) @network_client = @service.instance_variable_get(:@network_client) @circuit_peering = @network_client.express_route_circuit_peerings end def test_list_express_route_circuit_peerings_success mocked_response = ApiStub::Requests::Network::ExpressRouteCircuitPeering.list_express_route_circuit_peering_response(@network_client) @circuit_peering.stub :list, mocked_response do assert_equal @service.list_express_route_circuit_peerings('fogRM-rg', 'testCircuit'), mocked_response end end def test_list_express_route_circuit_peerings_failure response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) } @circuit_peering.stub :list, response do assert_raises(RuntimeError) { @service.list_express_route_circuit_peerings('fogRM-rg', 'testCircuit') } end end end
Version data entries
33 entries across 33 versions & 4 rubygems