Ejemplo n.º 1
0
        public override void Specify()
        {
            it("recognizes no strings mean no prefix", () =>
            {
                expect(() => "" == CommonStringPrefix.Of(new string[0]));
            });

            it("recognizes a single string is its own prefix", () =>
            {
                expect(() => "abc" == CommonStringPrefix.Of(new[]
                {
                    "abc"
                }));
            });

            it("recognizes when there is no prefix", () =>
            {
                expect(() => "" == CommonStringPrefix.Of(new[]
                {
                    "abc",
                    "def"
                }));
            });

            it("recognizes when there is a prefix", () =>
            {
                expect(() => "cat " == CommonStringPrefix.Of(new[]
                {
                    "cat abc",
                    "cat def"
                }));
            });
        }
Ejemplo n.º 2
0
        public void RunTests(IEnumerable <TestCase> tests, IRunContext runContext, IFrameworkHandle frameworkHandle)
        {
            var explicitlyInclude = CommonStringPrefix.Of(tests.Select(t => t.FullyQualifiedName));

            InternalRunTests(tests, runContext, frameworkHandle, explicitlyInclude);
        }