<commit_before>﻿namespace Grean.AtomEventStore.UnitTests.FSharp

open Grean.AtomEventStore
open Grean.AtomEventStore.UnitTests.FSharp.TestDsl
open Xunit.Extensions

module AtomeEventStreamFacadeTests =

    [<Theory; InMemoryConventions>]
    let SutCorrectlyRoundTripsASingleElement
        (sut : AtomEventStream<TestEventF>)
        (tef : TestEventF) =
        
        sut.AppendAsync(tef).Wait()
        let actual = sut |> Seq.toList

        Verify <@ actual.Length = 1 @><commit_msg>Added another Facade Test<commit_after>﻿namespace Grean.AtomEventStore.UnitTests.FSharp

open Grean.AtomEventStore
open Grean.AtomEventStore.UnitTests.FSharp.TestDsl
open Ploeh.AutoFixture
open Xunit.Extensions

module AtomeEventStreamFacadeTests =

    [<Theory; InMemoryConventions>]
    let SutCorrectlyRoundTripsASingleElement
        (sut : AtomEventStream<TestEventF>)
        (tef : TestEventF) =
        
        sut.AppendAsync(tef).Wait()
        let actual = sut |> Seq.toList

        Verify <@ actual.Length = 1 @>

    [<Theory; InMemoryConventions>]
    let SutCurrectlyRoundTripsMultipleElements
        (sut : AtomEventStream<TestEventF>)
        (g : Generator<TestEventF>) =

        let tefs = g |> Seq.take 3 |> Seq.toList

        tefs |> List.iter(fun tef -> sut.AppendAsync(tef).Wait())
        let actual = sut |> Seq.toList

        let expected = tefs |> List.rev
        Verify <@ expected = actual @>
{'fraction_non_alphanumeric': 0.09711470795214637, 'fraction_numerical': 0.00211118930330753, 'mean_word_length': 3.1457725947521866, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, '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': '1790432', 'n_tokens_mistral': 490, 'n_tokens_neox': 468, 'n_words': 86}