<commit_before>﻿import * as ClientExtent from "../Client.Extents"
import * as ClientWorkspace from "../Client.Workspace"

export function includeTests() {
    describe('Client', function () {
        describe('Extents', function () {

            before(function () {
                return new Promise<void>(done => {
                    ClientWorkspace.createWorkspace(
                        "Test",
                        "Annotation",
                        {skipIfExisting: true}).done(() => done());
                });
            });

            it('Create and delete Xmi Extent', function (done) {
                ClientExtent.deleteExtent(
                    {
                        workspace: "Test",
                        extentUri: "dm:///unittest"
                    }
                ).then(() => {
                    return ClientExtent.createXmi(
                        {
                            extentUri: "dm:///unittest",
                            filePath: "./unittest.xmi",
                            workspace: "Test"
                        }
                    );
                }).then(result => {
                    chai.assert.isTrue(result.success, "Creation did not work");
                    return ClientExtent.deleteExtent(
                        {
                            workspace: "Test",
                            extentUri: "dm:///unittest"
                        }
                    );
                }).then(result => {
                    chai.assert.isTrue(result.success, "Deletion did not work");
                    done();
                }).catch(e => done(e));
            });

            after(function () {
                return new Promise<void>(done => {
                    return ClientExtent.deleteExtent({
                        workspace: "Test",
                        extentUri: "dm:///unittest",
                        skipIfNotExisting: true
                    }).done(done);
                }).then(done => {
                    ClientWorkspace.deleteWorkspace("Test");
                });
            });
        });
    });
}<commit_msg>Test started (but commented out)<commit_after>﻿import * as ClientExtent from "../Client.Extents"
import * as ClientWorkspace from "../Client.Workspace"

export function includeTests() {
    describe('Client', function () {
        describe('Extents', function () {

            before(function () {
                return new Promise<void>(done => {
                    ClientWorkspace.createWorkspace(
                        "Test",
                        "Annotation",
                        {skipIfExisting: true}).done(() => done());
                });
            });

            it('Create and delete Xmi Extent', function (done) {
                ClientExtent.deleteExtent(
                    {
                        workspace: "Test",
                        extentUri: "dm:///unittest"
                    }
                ).then(() => {
                    return ClientExtent.createXmi(
                        {
                            extentUri: "dm:///unittest",
                            filePath: "./unittest.xmi",
                            workspace: "Test"
                        }
                    );
                }).then(result => {
                    chai.assert.isTrue(result.success, "Creation did not work");
                    return ClientExtent.deleteExtent(
                        {
                            workspace: "Test",
                            extentUri: "dm:///unittest"
                        }
                    );
                }).then(result => {
                    chai.assert.isTrue(result.success, "Deletion did not work");
                    done();
                }).catch(e => done(e));
            });
            
            /*it('Create and delete Properties, if existing', function(done) {
                ClientExtent.deleteExtent(
                    {
                        workspace: "Test",
                        extentUri: "dm:///notexisting",
                        skipIfNotExisting: true
                    }).then(result => {
                    chai.assert.isTrue(result.success, "Tried Deletion was not successful");
                    chai.assert.isTrue(result.skipped, "Was not skipped");
                }).catch(e => done(e));            
            });*/

            after(function () {
                return new Promise<void>(done => {
                    return ClientExtent.deleteExtent({
                        workspace: "Test",
                        extentUri: "dm:///unittest",
                        skipIfNotExisting: true
                    }).done(done);
                }).then(done => {
                    ClientWorkspace.deleteWorkspace("Test");
                });
            });
        });
    });
}
{'fraction_non_alphanumeric': 0.11627430910951894, 'fraction_numerical': 0.0, 'mean_word_length': 0.9427435387673956, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2773439', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1048, 'n_words': 199}