Sha256: 0cd10fc59903d9913e7be9aeb8b583cb1f441dc4707c5fed96c6f9d85182272e

Contents?: true

Size: 1.31 KB

Versions: 46

Compression:

Stored size: 1.31 KB

Contents

module ApiStub
  module Models
    module Sql
      # Mock class for Database
      class SqlDatabase
        # This class contain two mocks, for collection and for model
        def self.create_database(sql_manager_client)
          database = '{
            "id" : "/subscriptions/########-####-####-####-############/resourceGroups/{resource-group-name}/providers/Microsoft.Sql/servers/{test-sql-server-name}/databases/{database-name}",
            "location" : "{database-location}",
            "properties" : {
              "createMode" : "{creation-mode}",
              "sourceDatabaseId" : "{source-database-id}",
              "edition" : "{database-edition}",
              "collation" : "{collation-name}",
              "maxSizeBytes" : "{max-database-size}",
              "requestedServiceObjectiveId" : "{requested-service-id}",
              "requestedServiceObjectiveName" : "{requested-service-id}",
              "restorePointInTime" : "{restore-time}",
              "sourceDatabaseDeletionDate" : "{source-deletion-date}",
              "elasticPoolName" : "{elastic-pool-name}"
            }
          }'
          database_mapper = Azure::ARM::SQL::Models::Database.mapper
          sql_manager_client.deserialize(database_mapper, Fog::JSON.decode(database), 'result.body')
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.6.0 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.5.3 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.5.2 test/api_stub/models/sql/sql_database.rb
far-gem-0.5.6 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.5.1 test/api_stub/models/sql/sql_database.rb
far-gem-0.5.5 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.5.0 test/api_stub/models/sql/sql_database.rb
far-gem-0.5.4 test/api_stub/models/sql/sql_database.rb
far-gem-0.5.3 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.4.9 test/api_stub/models/sql/sql_database.rb
far-gem-0.5.2 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.4.8 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.4.7 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.4.6 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.4.5 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-temp-0.0.5 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.4.4 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.4.3 test/api_stub/models/sql/sql_database.rb
far-gem-0.5.1 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.4.2 test/api_stub/models/sql/sql_database.rb