public void SendTestCaseShouldNotThrowIfCacheIsNull()
        {
            var sink = new TestCaseDiscoverySink(null);

            var testCase = new TestCase("A.C.M", new Uri("executor://unittest"), "A");

            // This should not throw.
            sink.SendTestCase(testCase);
        }
        public void SendTestCaseShouldSendTestCasesToCache()
        {
            var cache = new DiscoveryResultCache(1000, TimeSpan.FromHours(1), (tests) => { });
            var sink  = new TestCaseDiscoverySink(cache);

            var testCase = new TestCase("A.C.M", new Uri("executor://unittest"), "A");

            sink.SendTestCase(testCase);

            // Assert that the cache has the test case.
            Assert.IsNotNull(cache.Tests);
            Assert.AreEqual(1, cache.Tests.Count);
            Assert.AreEqual(testCase, cache.Tests[0]);
        }