Esempio n. 1
0
        public void TracksShowAllThreadsForUnownedThreads(bool showAllThreads)
        {
            var source = new ThreadReference[] { GetExampleThreadReference(0) };

            var criteria = new InventorySearchCriteria
            {
                ShowAllThreads = showAllThreads,
                SearchString   = "Id"
            };

            source.ApplyCriteria(criteria).Should().HaveCount(showAllThreads ? 1 : 0);
        }
Esempio n. 2
0
        public void ApplyWithInvalidTerm(string searchString)
        {
            var source = new ThreadReference[] { GetExampleThreadReference() };

            var criteria = new InventorySearchCriteria
            {
                ShowAllThreads = true,
                SearchString   = searchString
            };

            var results = source.ApplyCriteria(criteria).ToArray();

            Assert.False(results.Any());
        }
Esempio n. 3
0
        public void ApplyToIdAndDescription(string searchString)
        {
            var source = new ThreadReference[] { GetExampleThreadReference() };

            var criteria = new InventorySearchCriteria
            {
                ShowAllThreads = true,
                SearchString   = searchString
            };

            var results = source.ApplyCriteria(criteria).ToArray();

            results.Should().NotBeEmpty();
        }