GetTestMethod() 공개 메소드

Gets the [ViewTest] method with the given name.
public GetTestMethod ( string name ) : ViewTest
name string The name of the method to retrieve.
리턴 ViewTest
        public void TestSetup()
        {
            TestHarnessModel.ResetSingleton();
            TestRunnerMockViewTest.InvokeCount = 0;

            viewTestRunner = new ViewTestRunner { Interval = 0.01 };

            module = new ViewTestClassesAssemblyModule(new ModuleSetting());
            module.LoadAssembly(GetType().Assembly);

            testClass = module.GetTestClasses("TestRunnerMockViewTest").FirstOrDefault();
            testMethodInfo = testClass.GetTestMethod("SampleTestRunnerMethod").MethodInfo;
        }
        public void ShouldNotGetMethod()
        {
            var sampleType = new Sample().GetType(); // NB: Instance used to get actual SL type of (instead of 'typeof' which returns native Type).
            var model = new ViewTestClass(sampleType, "File.xap");

            model.GetTestMethod(null).ShouldBe(null);
            model.GetTestMethod("").ShouldBe(null);
            model.GetTestMethod("  ").ShouldBe(null);
        }
        public void ShouldGetMethod()
        {
            var sampleType = new Sample().GetType(); // NB: Instance used to get actual SL type of (instead of 'typeof' which returns native Type).
            var model = new ViewTestClass(sampleType, "File.xap");

            var method = model.GetTestMethod("method1");
            method.ShouldNotBe(null);
            model.ViewTests.ShouldContain(method);
        }