<commit_before>﻿using System.IO;
using Fake;
using Machine.Specifications;

namespace Test.Deployment
{
    public class when_creating_a_package_from_directory
    {
        const string PackageName = "helloworld";
        const string PackageVersion = "0.1";
        static readonly string Path = TestData.OutputDir + "helloworld.fakepkg";

        Because of = () =>
                     DeploymentHelper.createDeploymentPackageFromDirectory(
                         PackageName,
                         PackageVersion,
                         TestData.GetPackageDir("HelloWorld") + "DeployScript.fsx",
                         TestData.GetPackageDir("HelloWorld"),
                         TestData.OutputDir);

        It should_be_parsable_as_json = () =>
        {
            var package = DeploymentHelper.getPackageFromFile(Path);
            package.Key.Id.ShouldEqual(PackageName);
            package.Key.Version.ShouldEqual(PackageVersion);
        };

        It should_create_the_package = () => File.Exists(Path).ShouldBeTrue();
    }
}<commit_msg>Cleanup<commit_after>﻿using System.IO;
using Fake;
using Machine.Specifications;

namespace Test.Deployment
{
    public class when_creating_a_package_from_directory
    {
        const string PackageName = "HelloWorld";
        const string PackageVersion = "0.1";
        static readonly string Path = TestData.OutputDir + "helloworld.fakepkg";

        Because of = () =>
                     DeploymentHelper.createDeploymentPackageFromDirectory(
                         PackageName,
                         PackageVersion,
                         TestData.GetPackageDir(PackageName) + "DeployScript.fsx",
                         TestData.GetPackageDir(PackageName),
                         TestData.OutputDir);

        It should_be_parsable_as_json = () =>
        {
            var package = DeploymentHelper.getPackageFromFile(Path);
            package.Key.Id.ShouldEqual(PackageName);
            package.Key.Version.ShouldEqual(PackageVersion);
        };

        It should_create_the_package = () => File.Exists(Path).ShouldBeTrue();
    }
}
{'fraction_non_alphanumeric': 0.08748824082784572, 'fraction_numerical': 0.0018814675446848542, 'mean_word_length': 2.069264069264069, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1453886', 'n_tokens_mistral': 547, 'n_tokens_neox': 527, 'n_words': 88}