mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 10:38:31 -05:00
Replace deprecated assert functions in test files. (#16945)
This commit is contained in:
@@ -134,8 +134,8 @@ suite('Assessment Actions', () => {
|
||||
const connectionManagementService = createConnectionManagementService(dbListResult);
|
||||
|
||||
const action = new AsmtServerSelectItemsAction(connectionManagementService.object, new NullLogService(), mockAssessmentService.object, new NullAdsTelemetryService());
|
||||
assert.equal(action.id, AsmtServerSelectItemsAction.ID, 'Get Server Rules id action mismatch');
|
||||
assert.equal(action.label, AsmtServerSelectItemsAction.LABEL, 'Get Server Rules label action mismatch');
|
||||
assert.strictEqual(action.id, AsmtServerSelectItemsAction.ID, 'Get Server Rules id action mismatch');
|
||||
assert.strictEqual(action.label, AsmtServerSelectItemsAction.LABEL, 'Get Server Rules label action mismatch');
|
||||
|
||||
await action.run({ ownerUri: '', component: mockAsmtViewComponent.object, connectionId: '' });
|
||||
mockAsmtViewComponent.verify(s => s.showProgress(AssessmentType.AvailableRules), TypeMoq.Times.once());
|
||||
@@ -157,8 +157,8 @@ suite('Assessment Actions', () => {
|
||||
const connectionManagementService = createConnectionManagementService(dbListResult);
|
||||
|
||||
const action = new AsmtServerInvokeItemsAction(connectionManagementService.object, new NullLogService(), mockAssessmentService.object, new NullAdsTelemetryService());
|
||||
assert.equal(action.id, AsmtServerInvokeItemsAction.ID, 'Invoke Server Assessment id action mismatch');
|
||||
assert.equal(action.label, AsmtServerInvokeItemsAction.LABEL, 'Invoke Server Assessment label action mismatch');
|
||||
assert.strictEqual(action.id, AsmtServerInvokeItemsAction.ID, 'Invoke Server Assessment id action mismatch');
|
||||
assert.strictEqual(action.label, AsmtServerInvokeItemsAction.LABEL, 'Invoke Server Assessment label action mismatch');
|
||||
|
||||
await action.run({ ownerUri: '', component: mockAsmtViewComponent.object, connectionId: '' });
|
||||
mockAsmtViewComponent.verify(s => s.showProgress(AssessmentType.InvokeAssessment), TypeMoq.Times.once());
|
||||
@@ -173,7 +173,7 @@ suite('Assessment Actions', () => {
|
||||
|
||||
test('Get Assessment Items Database Action', async () => {
|
||||
const action = new AsmtDatabaseSelectItemsAction('databaseName', mockAssessmentService.object, new NullAdsTelemetryService());
|
||||
assert.equal(action.id, AsmtDatabaseSelectItemsAction.ID, 'Get Database Rules id action mismatch');
|
||||
assert.strictEqual(action.id, AsmtDatabaseSelectItemsAction.ID, 'Get Database Rules id action mismatch');
|
||||
|
||||
await action.run({ ownerUri: '', component: mockAsmtViewComponent.object, connectionId: '' });
|
||||
mockAsmtViewComponent.verify(s => s.showProgress(AssessmentType.AvailableRules), TypeMoq.Times.once());
|
||||
@@ -185,7 +185,7 @@ suite('Assessment Actions', () => {
|
||||
|
||||
test('Invoke Database Assessment Action', async () => {
|
||||
const action = new AsmtDatabaseInvokeItemsAction('databaseName', mockAssessmentService.object, new NullAdsTelemetryService());
|
||||
assert.equal(action.id, AsmtDatabaseInvokeItemsAction.ID, 'Invoke Database Assessment id action mismatch');
|
||||
assert.strictEqual(action.id, AsmtDatabaseInvokeItemsAction.ID, 'Invoke Database Assessment id action mismatch');
|
||||
|
||||
await action.run({ ownerUri: '', component: mockAsmtViewComponent.object, connectionId: '' });
|
||||
mockAsmtViewComponent.verify(s => s.showProgress(AssessmentType.InvokeAssessment), TypeMoq.Times.once());
|
||||
@@ -197,8 +197,8 @@ suite('Assessment Actions', () => {
|
||||
|
||||
test('Generate Script Action', async () => {
|
||||
const action = new AsmtExportAsScriptAction(mockAssessmentService.object, new NullAdsTelemetryService());
|
||||
assert.equal(action.id, AsmtExportAsScriptAction.ID, 'Generate Assessment script id action mismatch');
|
||||
assert.equal(action.label, AsmtExportAsScriptAction.LABEL, 'Generate Assessment script label action mismatch');
|
||||
assert.strictEqual(action.id, AsmtExportAsScriptAction.ID, 'Generate Assessment script id action mismatch');
|
||||
assert.strictEqual(action.label, AsmtExportAsScriptAction.LABEL, 'Generate Assessment script label action mismatch');
|
||||
|
||||
await action.run({ ownerUri: '', component: mockAsmtViewComponent.object, connectionId: '' });
|
||||
mockAssessmentService.verify(s => s.generateAssessmentScript(TypeMoq.It.isAnyString(), TypeMoq.It.isAny()), TypeMoq.Times.once());
|
||||
@@ -209,8 +209,8 @@ suite('Assessment Actions', () => {
|
||||
openerService.setup(s => s.open(TypeMoq.It.isAny())).returns(() => Promise.resolve(true));
|
||||
|
||||
const action = new AsmtSamplesLinkAction(openerService.object, new NullAdsTelemetryService());
|
||||
assert.equal(action.id, AsmtSamplesLinkAction.ID, 'Samples Link id action mismatch');
|
||||
assert.equal(action.label, AsmtSamplesLinkAction.LABEL, 'Samples Link label action mismatch');
|
||||
assert.strictEqual(action.id, AsmtSamplesLinkAction.ID, 'Samples Link id action mismatch');
|
||||
assert.strictEqual(action.label, AsmtSamplesLinkAction.LABEL, 'Samples Link label action mismatch');
|
||||
|
||||
await action.run();
|
||||
openerService.verify(s => s.open(TypeMoq.It.isAny()), TypeMoq.Times.once());
|
||||
@@ -251,8 +251,8 @@ suite('Assessment Actions', () => {
|
||||
new NullAdsTelemetryService(),
|
||||
notificationService.object,
|
||||
fileDialogService);
|
||||
assert.equal(action.id, AsmtGenerateHTMLReportAction.ID, 'Generate HTML Report id action mismatch');
|
||||
assert.equal(action.label, AsmtGenerateHTMLReportAction.LABEL, 'Generate HTML Report label action mismatch');
|
||||
assert.strictEqual(action.id, AsmtGenerateHTMLReportAction.ID, 'Generate HTML Report id action mismatch');
|
||||
assert.strictEqual(action.label, AsmtGenerateHTMLReportAction.LABEL, 'Generate HTML Report label action mismatch');
|
||||
|
||||
await action.run({ ownerUri: '', component: mockAsmtViewComponent.object, connectionId: '' });
|
||||
notificationService.verify(s => s.prompt(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.once());
|
||||
|
||||
Reference in New Issue
Block a user