test/api_stub/requests/sql/sql_server.rb in fog-azure-rm-0.1.2 vs test/api_stub/requests/sql/sql_server.rb in fog-azure-rm-0.2.0

- old
+ new

@@ -1,23 +1,25 @@ module ApiStub module Requests module Sql # Mock class for Sql Server class SqlServer - def self.create_sql_server_response - '{ + def self.create_sql_server_response(sql_manager_client) + body = '{ "location" : "{server-location}", "properties" : { "version" : "{server-version}", "administratorLogin" : "{admin-name}", "administratorLoginPassword" : "{admin-password}" } }' + server_mapper = Azure::ARM::SQL::Models::Server.mapper + sql_manager_client.deserialize(server_mapper, Fog::JSON.decode(body), 'result.body') end - def self.list_sql_server_response - '{ + def self.list_sql_server_response(sql_manager_client) + body = '{ "value": [{ "name" : "{database-name}", "server_name" : "{server-name}", "location" : "{database-location}", "properties" : { @@ -25,9 +27,11 @@ "administratorLogin" : "{admin-name}", "administratorLoginPassword" : "{admin-password}" } }] }' + server_mapper = Azure::ARM::SQL::Models::ServerListResult.mapper + sql_manager_client.deserialize(server_mapper, Fog::JSON.decode(body), 'result.body') end def self.sql_server_hash { resource_group: 'resource_group',