mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 09:35:38 -05:00
Import project from database (#10326)
* Initial changes for Import database as new project * Functionally complete code * Initial changes for Import database as new project * Functionally complete code * Resolved conflicts with latest changes. Also did some code refactoring. * Addressed comments. Added unit tests. * Addressed comments * Moved ExtractTarget enum from azdata to mssql * Addressed comments * Fixed indentation in project templates
This commit is contained in:
@@ -54,4 +54,17 @@ describe('Project: sqlproj content operations', function (): void {
|
||||
|
||||
should (newFileContents).equal(fileContents);
|
||||
});
|
||||
|
||||
it('Should add Folder and Build entries to sqlproj with pre-existing scripts on disk', async function (): Promise<void> {
|
||||
projFilePath = await testUtils.createTestSqlProjFile(baselines.newProjectFileBaseline);
|
||||
const project: Project = new Project(projFilePath);
|
||||
await project.readProjFile();
|
||||
|
||||
let list: string[] = await testUtils.createListOfFiles(path.dirname(projFilePath));
|
||||
|
||||
await project.addToProject(list);
|
||||
|
||||
should(project.files.filter(f => f.type === EntryType.File).length).equal(11); // txt file shouldn't be added to the project
|
||||
should(project.files.filter(f => f.type === EntryType.Folder).length).equal(3); // 2folders + default Properties folder
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user