<commit_before>﻿using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using DatenMeister.Core.EMOF.Interface.Reflection;
using DatenMeister.Models;
using DatenMeister.Provider.InMemory;
using DatenMeister.Runtime;
using NUnit.Framework;

namespace DatenMeister.Tests.Modules.Actions
{
    [TestFixture]
    public class ExportXmiTests
    {
        [Test]
        public async Task TestExportXmi()
        {
            var actionLogic = ActionSetTests.CreateActionLogic();
            var (source, target) = ActionSetTests.CreateExtents(actionLogic);

            var temporaryStorage = DatenMeisterTests.GetPathForTemporaryStorage("export.xmi");

            var action = (IElement) InMemoryObject.CreateEmpty(_DatenMeister.TheOne.Actions.__ExportToXmiAction)
                .SetProperties(new Dictionary<string, object>
                {
                    [_DatenMeister._Actions._ExportToXmiAction.sourcePath] = "dm:///source/",
                    [_DatenMeister._Actions._ExportToXmiAction.filePath] = temporaryStorage,

                });

            await actionLogic.ExecuteAction(action);

            Assert.That(File.Exists(temporaryStorage), Is.True);

            var fileContent = File.ReadAllText(temporaryStorage);
            Assert.That(fileContent.Contains("source1.2"), Is.True);

        }
        
        
    }
}<commit_msg>Minor fix and files are deleted<commit_after>﻿using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using DatenMeister.Core.EMOF.Interface.Reflection;
using DatenMeister.Models;
using DatenMeister.Provider.InMemory;
using DatenMeister.Runtime;
using NUnit.Framework;

namespace DatenMeister.Tests.Modules.Actions
{
    [TestFixture]
    public class ExportXmiTests
    {
        [Test]
        public async Task TestExportXmi()
        {
            var actionLogic = ActionSetTests.CreateActionLogic();
            var (source, target) = ActionSetTests.CreateExtents(actionLogic);

            var temporaryStorage = DatenMeisterTests.GetPathForTemporaryStorage("export.xmi");

            var action = (IElement) InMemoryObject.CreateEmpty(_DatenMeister.TheOne.Actions.__ExportToXmiAction)
                .SetProperties(new Dictionary<string, object>
                {
                    [_DatenMeister._Actions._ExportToXmiAction.sourcePath] = "dm:///source/",
                    [_DatenMeister._Actions._ExportToXmiAction.filePath] = temporaryStorage,

                });

            await actionLogic.ExecuteAction(action);

            Assert.That(File.Exists(temporaryStorage), Is.True);

            var fileContent = await File.ReadAllTextAsync(temporaryStorage);
            Assert.That(fileContent.Contains("source1.2"), Is.True);

            File.Delete(temporaryStorage);
        }
    }
}
{'fraction_non_alphanumeric': 0.09446022727272728, 'fraction_numerical': 0.0014204545454545455, 'mean_word_length': 2.7509986684420773, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6342628', 'n_tokens_mistral': 795, 'n_tokens_neox': 767, 'n_words': 121}