Beispiel #1
0
        private static PlayerTestsRunResult GetTestsRunResultFor(Func <ITestMethod, bool> filter)
        {
            var kataConfiguration       = new Configuration();
            var goldenTestType          = kataConfiguration.GetKataTestsType();
            var kataImplementationTypes = kataConfiguration.GetKataImplementationTypes().ToArray();
            var testMethodsRetriever    = new CustomTestMethodsRetriever(filter);
            var playerTestsRunner       = new PlayerTestsRunner <IStringCalculator>(
                goldenTestType, kataImplementationTypes, testMethodsRetriever);
            var result = playerTestsRunner.Run();

            return(result);
        }
Beispiel #2
0
        public void Run_GivenTestMethodWithExpectedExceptionAttribute_ShouldSetHasExpectedExceptionAttributeToTrue()
        {
            //---------------Set up test pack-------------------
            var playerTestsRunner = new PlayerTestsRunner <IStringCalculator>(typeof(PlayerTestStringCalculator),
                                                                              new[] {
                typeof(Player_StringCalculator_AtLevel0),
                typeof(Player_StringCalculator_AtLevel1)
            });
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var playerTestsRunResult = playerTestsRunner.Run();

            //---------------Test Result -----------------------
            Assert.IsTrue(playerTestsRunResult.HasExpectedExceptionAttribute);
        }
Beispiel #3
0
            public void ShouldFindLevel()
            {
                //---------------Set up test pack-------------------
                var determiner = new PlayerTestsRunner <IStringCalculator>(typeof(PlayerTestStringCalculator),
                                                                           new[]
                {
                    typeof(Player_StringCalculator_AtLevel0),
                    typeof(Player_StringCalculator_AtLevel1)
                });

                //---------------Assert Precondition----------------

                //---------------Execute Test ----------------------

                //---------------Test Result -----------------------
                Assert.Fail("Test Not Yet Implemented");
            }