<commit_before>﻿module HolidaysApi.Tests

open NUnit.Framework
open FsCheck
open System 
open Aklefdal.Holidays.HttpApi.Computus

let ``Easter Day is Sunday`` (date: DateTime) =
    let easter = EasterDay2 date.Year
    easter.DayOfWeek = DayOfWeek.Sunday

[<Test>]
let ``Test that easterday is sunday``() = 
    Check.QuickThrowOnFailure ``Easter Day is Sunday``

let ``In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``(date: DateTime) =
    let easter = EasterDay date.Year
    let firstPossibleDay = new DateTime(date.Year, 3, 22)
    let lastPossibleDay = new DateTime(date.Year, 4, 25)
    easter >= firstPossibleDay && easter <= lastPossibleDay 

let ``Alg2: In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``(date: DateTime) =
    let easter = EasterDay2 date.Year
    let firstPossibleDay = new DateTime(date.Year, 3, 22)
    let lastPossibleDay = new DateTime(date.Year, 4, 25)
    easter >= firstPossibleDay && easter <= lastPossibleDay 

[<Test>]
let ``Test that In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``() =
    Check.QuickThrowOnFailure ``In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``

[<Test>]
let ``Alg2: Test that In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``() =
    Check.QuickThrowOnFailure ``Alg2: In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``<commit_msg>Added check that algorithms are equal<commit_after>﻿module HolidaysApi.Tests

open NUnit.Framework
open FsCheck
open System 
open Aklefdal.Holidays.HttpApi.Computus

let ``Easter Day is Sunday`` (date: DateTime) =
    let easter = EasterDay2 date.Year
    easter.DayOfWeek = DayOfWeek.Sunday

let ``Algorithms are equal`` (date: DateTime) =
    EasterDay date.Year = EasterDay2 date.Year

[<Test>]
let ``Test Algorithms are equal`` () = 
    Check.QuickThrowOnFailure ``Algorithms are equal``

[<Test>]
let ``Test that easterday is sunday``() = 
    Check.QuickThrowOnFailure ``Easter Day is Sunday``

let ``In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``(date: DateTime) =
    let easter = EasterDay date.Year
    let firstPossibleDay = new DateTime(date.Year, 3, 22)
    let lastPossibleDay = new DateTime(date.Year, 4, 25)
    easter >= firstPossibleDay && easter <= lastPossibleDay && easter.DayOfWeek = DayOfWeek.Sunday

let ``Alg2: In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``(date: DateTime) =
    let easter = EasterDay2 date.Year
    let firstPossibleDay = new DateTime(date.Year, 3, 22)
    let lastPossibleDay = new DateTime(date.Year, 4, 25)
    easter >= firstPossibleDay && easter <= lastPossibleDay 


[<Test>]
let ``Test that In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``() =
    Check.QuickThrowOnFailure ``In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``

[<Test>]
let ``Alg2: Test that In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``() =
    Check.QuickThrowOnFailure ``Alg2: In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``
{'fraction_non_alphanumeric': 0.08263157894736842, 'fraction_numerical': 0.021842105263157895, 'mean_word_length': 4.65625, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '7226218', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1031, 'n_words': 450}