Sha256: 79d7851fe62c9eeac7f46d138631f380cc83446a8dfe289b0a3b5a76597e6731
Contents?: true
Size: 1.61 KB
Versions: 3
Compression:
Stored size: 1.61 KB
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for VirtualNetworkGatewayConnection Collection class TestVirtualNetworkGatewayConnections < Minitest::Test def setup @service = Fog::Network::AzureRM.new(credentials) @gateway_connections = Fog::Network::AzureRM::VirtualNetworkGatewayConnections.new(resource_group: 'fog-rg', service: @service) @network_client = @service.instance_variable_get(:@network_client) @response = ApiStub::Models::Network::VirtualNetworkGatewayConnection.create_virtual_network_gateway_connection_response(@network_client) end def test_collection_methods methods = [ :all, :get ] methods.each do |method| assert_respond_to @gateway_connections, method end end def test_collection_attributes assert_respond_to @gateway_connections, :resource_group end def test_all_method_response connection_response = [@response] @service.stub :list_virtual_network_gateway_connections, connection_response do assert_instance_of Fog::Network::AzureRM::VirtualNetworkGatewayConnections, @gateway_connections.all assert @gateway_connections.all.size >= 1 @gateway_connections.all.each do |gateway_connection| assert_instance_of Fog::Network::AzureRM::VirtualNetworkGatewayConnection, gateway_connection end end end def test_get_method_response @service.stub :get_virtual_network_gateway_connection, @response do assert_instance_of Fog::Network::AzureRM::VirtualNetworkGatewayConnection, @gateway_connections.get('fog-rg', 'cn1') end end end
Version data entries
3 entries across 3 versions & 1 rubygems