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.4.1 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.4.0 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.3.9 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.3.8 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.3.7 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.3.6 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.3.5 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.3.4 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-temp-0.0.4 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-temp-0.0.3 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.3.3 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-temp-0.0.2 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-temp-0.0.1 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.3.2 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-downgraded-0.3.1 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.3.1 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-downgraded-0.3.0 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.3.0 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.2.7 test/api_stub/models/sql/sql_database.rb
fog-azure-rm-0.2.6 test/api_stub/models/sql/sql_database.rb