mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Schema Compare tests for utils (#10759)
* Added a few tests for utils file under Schema Compare * Addressed comment- moved mock test data to a common location
This commit is contained in:
55
extensions/schema-compare/src/test/testUtils.ts
Normal file
55
extensions/schema-compare/src/test/testUtils.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as mssql from '../../../mssql';
|
||||
|
||||
// Mock test data
|
||||
export const mockConnectionProfile: azdata.IConnectionProfile = {
|
||||
connectionName: 'My Connection',
|
||||
serverName: 'My Server',
|
||||
databaseName: 'My Database',
|
||||
userName: 'My User',
|
||||
password: 'My Pwd',
|
||||
authenticationType: 'SqlLogin',
|
||||
savePassword: false,
|
||||
groupFullName: 'My groupName',
|
||||
groupId: 'My GroupId',
|
||||
providerName: 'My Provider',
|
||||
saveProfile: true,
|
||||
id: 'My Id',
|
||||
options: null
|
||||
};
|
||||
|
||||
export const mockConnectionInfo = {
|
||||
options: {},
|
||||
serverName: 'My Server',
|
||||
databaseName: 'My Database',
|
||||
userName: 'My User',
|
||||
password: 'My Pwd',
|
||||
authenticationType: 'SqlLogin'
|
||||
};
|
||||
|
||||
export const mockFilePath: string = 'test.dacpac';
|
||||
|
||||
export const mockDacpacEndpoint: mssql.SchemaCompareEndpointInfo = {
|
||||
endpointType: mssql.SchemaCompareEndpointType.Dacpac,
|
||||
serverDisplayName: '',
|
||||
serverName: '',
|
||||
databaseName: '',
|
||||
ownerUri: '',
|
||||
packageFilePath: mockFilePath,
|
||||
connectionDetails: undefined
|
||||
};
|
||||
|
||||
export const mockDatabaseEndpoint: mssql.SchemaCompareEndpointInfo = {
|
||||
endpointType: mssql.SchemaCompareEndpointType.Database,
|
||||
serverDisplayName: '',
|
||||
serverName: '',
|
||||
databaseName: '',
|
||||
ownerUri: '',
|
||||
packageFilePath: '',
|
||||
connectionDetails: undefined
|
||||
};
|
||||
Reference in New Issue
Block a user