public void when_enumerate_onlyinjoinlist_it_should_be_filtered() { var wrapped = new ListElementsWrapper<int> (new []{ 1, 2, 3 }); var joinList = wrapped.OnlyIn (new List<int>{ 1, 3, 4 }); Check.That (joinList).ContainsExactly (4); }
public void when_call_OnlyIn_it_stores_other_list_in_other() { var wrapped = new ListElementsWrapper<User> (SampleData.Source); wrapped.OnlyIn (SampleData.Modified); Check.That (wrapped.Other).IsEqualTo (SampleData.Modified); }
public void when_enumerate_it_should_be_equal_to_source() { var wrapped = new ListElementsWrapper<User> (SampleData.Source); var enumerated = (wrapped as IEnumerable<User>).ToList (); Check.That (enumerated).ContainsExactly (SampleData.Source); }
public void it_is_available_in_alsoin_joinedlist() { var wrapped = new ListElementsWrapper<User> (SampleData.Source); var joinList = wrapped.AlsoIn (SampleData.Modified); var changed = joinList.ModifiedBy (x => x); Check.That (changed).IsNotEqualTo (null); Check.That (changed).InheritsFrom<ElementsInBothListButModified<User,object>> (); }
public void when_call_OnlyIn_then_return_type_is_a_joinedList_of_onlyin_type() { var wrapped = new ListElementsWrapper<User> (SampleData.Source); var joinList = wrapped.OnlyIn (SampleData.Modified); Check.That (joinList).InheritsFrom<IEnumerable<User>> (); Check.That (joinList).InheritsFrom<JoinedListElement<User>> (); Check.That (joinList).InheritsFrom<OnlyInJoinedListElement<User,object>> (); }
public void it_is_enumerable() { var wrapped = new ListElementsWrapper<User> (SampleData.Source); Check.That (wrapped).InheritsFrom<IEnumerable<User>> (); }