public void Discoverer_should_return_examples()
        {
            var sink = new SinkMock();
            var target = new NSpecTestDiscoverer();
            var specs = Path.GetFullPath(@"..\..\..\SampleSpecs\bin\Debug\SampleSpecs.dll");

            target.DiscoverTests(new string[] { specs }, null, null, sink);

            Assert.AreEqual(4, sink.TestCases.Count);
        }
        public void Discoverer_should_return_examples()
        {
            var sink   = new SinkMock();
            var target = new NSpecTestDiscoverer();
            var specs  = Path.GetFullPath(@"..\..\..\SampleSpecs\bin\Debug\SampleSpecs.dll");

            target.DiscoverTests(new string[] { specs }, null, null, sink);

            Assert.AreEqual(4, sink.TestCases.Count);
        }
        public void Discoverer_should_recognize_tags()
        {
            var sink = new SinkMock();
            var target = new NSpecTestDiscoverer();
            var specs = Path.GetFullPath(@"..\..\..\SampleSpecs\bin\Debug\SampleSpecs.dll");

            target.DiscoverTests(new string[] { specs }, null, null, sink);
            var tags = sink.TestCases.SelectMany(tc => tc.Traits);

            Assert.AreEqual(4, tags.Where(t => t.Name == "describe DeepThought").Count());
            Assert.IsTrue(tags.Any(t => t.Name == "describe Earth"));
            Assert.IsTrue(tags.Any(t => t.Name == "One-should-fail"));
            Assert.IsTrue(tags.Any(t => t.Name == "One-should-pass"));
            Assert.IsTrue(tags.Any(t => t.Name == "Should be skipped"));
            Assert.IsTrue(tags.Any(t => t.Name == "Derived"));
        }
        public void Discoverer_should_recognize_tags()
        {
            var sink   = new SinkMock();
            var target = new NSpecTestDiscoverer();
            var specs  = Path.GetFullPath(@"..\..\..\SampleSpecs\bin\Debug\SampleSpecs.dll");

            target.DiscoverTests(new string[] { specs }, null, null, sink);
            var tags = sink.TestCases.SelectMany(tc => tc.Traits);

            Assert.AreEqual(4, tags.Where(t => t.Name == "describe DeepThought").Count());
            Assert.IsTrue(tags.Any(t => t.Name == "describe Earth"));
            Assert.IsTrue(tags.Any(t => t.Name == "One-should-fail"));
            Assert.IsTrue(tags.Any(t => t.Name == "One-should-pass"));
            Assert.IsTrue(tags.Any(t => t.Name == "Should be skipped"));
            Assert.IsTrue(tags.Any(t => t.Name == "Derived"));
        }