示例#1
0
        public void Test003()
        {
            var discoverer = new RazorTestDiscoverer(_messageBus);
            var testMethod = Mocks.TestMethod(typeof(ZeroFixtureComponent), nameof(TestComponentBase.RazorTests));

            var testCases = discoverer.Discover(_options, testMethod, _attribute);

            testCases.ShouldBeEmpty();
        }
示例#2
0
        public void Test001()
        {
            var discoverer = new RazorTestDiscoverer(_messageBus);
            var testMethod = Mocks.TestMethod(typeof(OneFixtureComponent), nameof(TestComponentBase.RazorTests));

            var testCases = discoverer.Discover(_options, testMethod, _attribute);

            testCases.ShouldAllBe(x => x.DisplayName.ShouldBe("FIXTURE 1"));
        }
示例#3
0
        public void Test005()
        {
            var discoverer = new RazorTestDiscoverer(_messageBus);
            var testMethod = Mocks.TestMethod(typeof(TimeoutRazorComponent), nameof(TestComponentBase.RazorTests));

            var testCases = discoverer.Discover(_options, testMethod, _attribute);

            var actualTimeout = testCases.Single().Timeout;

            TimeSpan.FromMilliseconds(actualTimeout).ShouldBe(TimeoutRazorComponent.TIMEOUT);
        }
示例#4
0
        public void Test004()
        {
            var discoverer = new RazorTestDiscoverer(_messageBus);
            var testMethod = Mocks.TestMethod(typeof(FixturesWithoutDescription), nameof(TestComponentBase.RazorTests));

            var testCases = discoverer.Discover(_options, testMethod, _attribute);

            testCases.ShouldAllBe(
                x => x.DisplayName.ShouldBe(nameof(FixturesWithoutDescription.SyncTest)),
                x => x.DisplayName.ShouldBe(nameof(FixturesWithoutDescription.AsyncTest))
                );
        }