Idiomatic F# unit test using xunit and unquote I'm writing some unit tests for testing C# code but I'm using F# and Unquote for the first time for the unit tests and would like some input as to how I might make the tests more 'f-sharpier' to take advantage of and learn more about the functional approach in F#. Here's an example of one of my tests - please make recommendations:

[&lt;Fact&gt;]
let ``Two courses, one with one time and one with two times that all differ, returns two unique schedules with two entries each``() =
    // arrange
    let course1 = getCourse1()
    let course2 = getCourse2()
    let time1 = getTime1()
    let time2 = getTime2()
    let time3 = getTime3()
    time1 |&gt; course1.AddTime
    time2 |&gt; course2.AddTime
    time3 |&gt; course2.AddTime

    let courses = List&lt;Course&gt;()
    [|course1; course2 |] |&gt; courses.AddRange

    let scheduleEntry1 = ScheduleEntry(course1, time1)
    let scheduleEntry2 = ScheduleEntry(course2, time2)
    let scheduleEntry3 = ScheduleEntry(course2, time3)

    // act
    let schedules = courses |&gt; ScheduleGenerator.Schedulize

    // assert
    test &lt;@ schedules.Count() = 2 @&gt;

    let allSchedulesHave2Entries = schedules.All(fun schedule -&gt; schedule.Count() = 2)
    test &lt;@ allSchedulesHave2Entries @&gt;

    let hasSchedule entries = schedules.Any(fun schedule -&gt; schedule.ToArray() = entries)
    test &lt;@ hasSchedule [| scheduleEntry1; scheduleEntry2 |] @&gt;
    test &lt;@ hasSchedule [| scheduleEntry1; scheduleEntry3 |] @&gt;


ScheduleGenerator.Schedulize returns an IEnumerable&lt;IEnumerable&lt;ScheduleEntry&gt;&gt; which is the type of schedules. So the type of schedule is just IEnumerable&lt;ScheduleEntry&gt;.

What ScheduleGenerator.Schedulize does is take a set of courses IEnumerable&lt;Course&gt;, where each course contains all available times for the course, and computes the Cartesian product for all the times across all the courses and then filters out any schedule which contains conflicting times.
I guess I mostly needed to figure out how to replace LINQ with F# equivalents and then refactor a bit. Now I have this:

let ToArrays schedules = 
    schedules 
    |&gt; Seq.map (fun schedule -&gt; schedule |&gt; Seq.toArray) 
    |&gt; Seq.toArray

[&lt;Fact&gt;]
let ``Two courses, one with one time and one with two times that all differ, returns two unique schedules with two entries each``() =
    // arrange
    let course1 = getCourse1()
    let course2 = getCourse2()
    let time1 = getTime1()
    let time2 = getTime2()
    let time2a = getTime2a()
    time1 |&gt; course1.AddTime
    time2 |&gt; course2.AddTime
    time2a |&gt; course2.AddTime

    let schedulesExpected =
        [| 
            [| ScheduleEntry(course1, time1); ScheduleEntry(course2, time2) |] 
            [| ScheduleEntry(course1, time1); ScheduleEntry(course2, time2a) |] 
        |]

    // act
    let schedulesActual = [| course1; course2 |] |&gt; ScheduleGenerator.Schedulyze

    // assert
    test &lt;@ schedulesActual |&gt; ToArrays = schedulesExpected @&gt;