summaryrefslogtreecommitdiff
path: root/spec/unit/utility/EnumerableExtensionsSpecs.cs
blob: 57636c337ca99acebc9fe7e7d2e38b5cf36f575d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Collections.Generic;
using jive.utility;
using Machine.Specifications;

namespace specs.unit.utility
{
  public class EnumerableExtensionsSpecs
  {
    [Subject(typeof (EnumerableExtensions))]
    public class when_joining_one_collection_with_another
    {
      It should_return_the_items_from_both = () =>
      {
        results.should_contain(1);
        results.should_contain(2);
      };

      Because b = () =>
      {
        results = new List<int> {1}.join_with(new List<int> {2});
      };

      static IEnumerable<int> results;
    }

    [Subject(typeof (EnumerableExtensions))]
    public class when_attemping_to_join_a_list_with_a_null_value
    {
      It should_return_the_original_list = () => new List<int> {1}.join_with(null).should_contain(1);
    }
  }
}