Sha256: 259350ecf69f65dc450c65028436e98b3c01d0a7a906b102fee053b3bf1a88ea
Contents?: true
Size: 1.62 KB
Versions: 3
Compression:
Stored size: 1.62 KB
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for VirtualNetworkGateway Model class TestVirtualNetworkGateway < Minitest::Test def setup @service = Fog::Network::AzureRM.new(credentials) @network_gateway = virtual_network_gateway(@service) network_client = @service.instance_variable_get(:@network_client) @response = ApiStub::Models::Network::VirtualNetworkGateway.create_virtual_network_gateway_response(network_client) end def test_model_methods methods = [ :save, :destroy ] methods.each do |method| assert @network_gateway.respond_to? method end end def test_model_attributes attributes = [ :name, :id, :location, :resource_group, :tags, :gateway_type, :gateway_size, :vpn_type, :enable_bgp, :provisioning_state, :sku_name, :sku_tier, :sku_capacity, :vpn_client_address_pool, :gateway_default_site, :default_sites, :ip_configurations, :vpn_client_configuration, :asn, :bgp_peering_address, :peer_weight ] attributes.each do |attribute| assert @network_gateway.respond_to? attribute end end def test_save_method_response @service.stub :create_or_update_virtual_network_gateway, @response do assert_instance_of Fog::Network::AzureRM::VirtualNetworkGateway, @network_gateway.save end end def test_destroy_method_response @service.stub :delete_virtual_network_gateway, true do assert @network_gateway.destroy end end end
Version data entries
3 entries across 3 versions & 1 rubygems