public void GetTestMethods_GivenMethodWithTestCaseAttribute_ShouldReturnMethod()
        {
            //---------------Set up test pack-------------------
            var testMethodsRetriever = new TestMethodsRetriever();
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var testMethods = testMethodsRetriever.GetTestMethods(typeof(SampleClassWithTestCaseAttribute));

            //---------------Test Result -----------------------
            Assert.AreEqual(1, testMethods.Length);
        }
        public void GetTestMethods_GivenMethodWithIgnoreAttribute_ShouldReturnEmpty()
        {
            //---------------Set up test pack-------------------
            var testMethodsRetriever = new TestMethodsRetriever();
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var testMethods = testMethodsRetriever.GetTestMethods(typeof(SampleClassWithIgnoreAttribute));

            //---------------Test Result -----------------------
            CollectionAssert.IsEmpty(testMethods);
        }
Beispiel #3
0
        private static OverallAnalysisResult GetOverallAnalysisResult(
            PlayerImplementationRunResult playerImplementationRunResult, PlayerTestsRunResult playerTestsRunResult,
            PlayerTestsPlayerImplementationRunResult playerTestsPlayerImplementationRunResult, Type kataTestsType)
        {
            var testMethodsRetriever = new TestMethodsRetriever();
            var goldenTestMethods    = testMethodsRetriever.GetTestMethods(kataTestsType);

            var overallAnalysisResult = new OverallAnalysisResult(
                playerImplementationRunResult,
                playerTestsRunResult,
                playerTestsPlayerImplementationRunResult,
                goldenTestMethods);

            return(overallAnalysisResult);
        }