Esempio n. 1
0
        public void ContainsUsingExplicitComparerWorks(int dummy, char deskSize, bool expected)
        {
            var source = EmployeeCollectionBuilder.Build("LMLL");
            var elem   = EmployeeCollectionBuilder.EmployeeWithDeskSize(deskSize);
            var actual = source.Contains(elem, new EmployeeDeskSizeComparer());

            Assert.That(actual, Is.EqualTo(expected));
        }
Esempio n. 2
0
        public void IndexOfUsingExplicitComparerWorks(int dummy, char deskSize, int from, int expected)
        {
            var source = EmployeeCollectionBuilder.Build("LLLSL");
            var elem   = EmployeeCollectionBuilder.EmployeeWithDeskSize(deskSize);
            var actual = source.IndexOf(elem, from, new EmployeeDeskSizeComparer());

            Assert.That(actual, Is.EqualTo(expected));
        }
Esempio n. 3
0
        public void EndsWithUsingAnExplicitComparerWorks(int dummy, string deskSizes, bool expected)
        {
            var source = EmployeeCollectionBuilder.Build("LLLMSL");
            var that   = EmployeeCollectionBuilder.Build(deskSizes);
            var actual = source.EndsWith(that, new EmployeeDeskSizeComparer());

            Assert.That(actual, Is.EqualTo(expected));
        }
Esempio n. 4
0
        public void LastIndexOfSliceWhenSourceSequenceIsAListUsingAnExplicitComparerWorks(int dummy, string deskSizes, int end, int expected)
        {
            var source = EmployeeCollectionBuilder.Build("LMSLSLM");
            var that   = EmployeeCollectionBuilder.Build(deskSizes);
            var actual = source.ToList().LastIndexOfSlice(that.ToList(), end, new EmployeeDeskSizeComparer());

            Assert.That(actual, Is.EqualTo(expected));
        }