Sha256: 156cc872c60fe894497634f1e87c3e70d8318b2f121e5265ddb160cf159ba1a6
Contents?: true
Size: 1.85 KB
Versions: 2
Compression:
Stored size: 1.85 KB
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for ExpressRouteCircuitAuthorizations Collection class TestExpressRouteCircuitAuthorizations < Minitest::Test def setup @service = Fog::Network::AzureRM.new(credentials) @circuit_authorizations = Fog::Network::AzureRM::ExpressRouteCircuitAuthorizations.new(resource_group: 'fog-test-rg', circuit_name: 'testCircuit', service: @service) @network_client = @service.instance_variable_get(:@network_client) end def test_collection_methods methods = [ :all, :get ] methods.each do |method| assert @circuit_authorizations.respond_to? method end end def test_collection_attributes assert @circuit_authorizations.respond_to? :resource_group assert @circuit_authorizations.respond_to? :circuit_name end def test_all_method_response response = [ApiStub::Models::Network::ExpressRouteCircuitAuthorization.create_express_route_circuit_authorization_response(@network_client)] @service.stub :list_express_route_circuit_authorizations, response do assert_instance_of Fog::Network::AzureRM::ExpressRouteCircuitAuthorizations, @circuit_authorizations.all assert @circuit_authorizations.all.size >= 1 @circuit_authorizations.all.each do |circuit_authorization| assert_instance_of Fog::Network::AzureRM::ExpressRouteCircuitAuthorization, circuit_authorization end end end def test_get_method_response response = ApiStub::Models::Network::ExpressRouteCircuitAuthorization.create_express_route_circuit_authorization_response(@network_client) @service.stub :get_express_route_circuit_authorization, response do assert_instance_of Fog::Network::AzureRM::ExpressRouteCircuitAuthorization, @circuit_authorizations.get('HaiderRG', 'testCircuit', 'auth-name') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.0.8 | test/models/network/test_express_route_circuit_authorizations.rb |
fog-azure-rm-0.0.6 | test/models/network/test_express_route_circuit_authorizations.rb |