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); }