Exemplo n.º 1
0
 private void getMember(XmlTextReader reader)
 {
     reader.Read();
     if (!_currentAssembly.Members.Contains(reader.Value))
     {
         _currentAssembly.AddMember(reader.Value);
     }
 }
 public void when_told_to_run_all_on_type_it_runs_all_on_type()
 {
     var runner = new Runner();
     var options = new AssemblyOptions(getAssembly());
     options.AddMember("AutoTest.TestRunners.SimpleTesting.Tests.Resources.SimpleTestingTests");
     var settings = new RunSettings(options, new string[] { }, null);
     var result = runner.Run(settings);
     Assert.That(result.Count(), Is.EqualTo(3));
 }
 private RunOptions GetRunOptions()
 {
     var assembly = new AssemblyOptions(@"P:\projects\mooseprofiler.git\MMProfiler\main\x86\Debug\Test.Target.dll");
     //assembly.AddTest(TestTarget);
     assembly.AddMember(TestTarget);
     var run = new RunnerOptions("NUnit");
     run.AddAssembly(assembly);
     var options = new RunOptions();
     options.AddTestRun(run);
     return options;
 }
Exemplo n.º 4
0
        public void Should_run_full_fixture()
        {
            var assemblyPath = Path.GetFullPath(@"AutoTest.TestRunners.MSTest.Tests.TestResource.dll");
            var assembly = new AssemblyOptions(assemblyPath);
            assembly.AddMember("AutoTest.TestRunners.MSTest.Tests.TestResource.TestFixture2");
            var settings = new RunSettings(assembly, new string[] { });
            var runner = new Runner();
            var result = runner.Run(settings);
            Assert.That(result.Count(), Is.EqualTo(2));
            var test = result.ElementAt(0);
            Assert.That(test.TestFixture, Is.EqualTo("AutoTest.TestRunners.MSTest.Tests.TestResource.TestFixture2"));
            Assert.That(test.TestName, Is.EqualTo("AutoTest.TestRunners.MSTest.Tests.TestResource.TestFixture2.Another_passing_test"));

            Assert.That(result.ElementAt(1).TestFixture, Is.EqualTo("AutoTest.TestRunners.MSTest.Tests.TestResource.TestFixture2"));
        }
 public void When_told_to_run_a_member_it_reports_all_tests_in_member_which_for_mspec_is_a_single_test()
 {
     var runner = new Runner();
     var options = new AssemblyOptions(getAssembly());
     options.AddMember("AutoTest.TestRunners.MSpec.Tests.TestResource.Can_add_numbers");
     var settings = new RunSettings(options, new string[] { }, null);
     var result = runner.Run(settings);
     Assert.That(result.Count(), Is.EqualTo(1));
     var test = result.ElementAt(0);
     Assert.That(test.State, Is.EqualTo(Shared.Results.TestState.Passed));
     Assert.That(test.Assembly, Is.EqualTo(getAssembly()));
     Assert.That(test.Runner, Is.EqualTo("MSpec"));
     Assert.That(test.TestFixture, Is.EqualTo("AutoTest.TestRunners.MSpec.Tests.TestResource.Can_add_numbers"));
     Assert.That(test.TestName, Is.EqualTo("AutoTest.TestRunners.MSpec.Tests.TestResource.Can_add_numbers"));
 }
Exemplo n.º 6
0
 private void getMember(XmlTextReader reader)
 {
     reader.Read();
     _currentAssembly.AddMember(reader.Value);
 }
Exemplo n.º 7
0
 public void Should_run_single_test_and_type()
 {
     var assembly = new AssemblyOptions(
         Path.GetFullPath(@"AutoTest.TestRunners.NUnit.Tests.TestResource.dll")
     );
     assembly.AddTest("AutoTest.TestRunners.NUnit.Tests.TestResource.Fixture1.Should_ignore");
     assembly.AddMember("AutoTest.TestRunners.NUnit.Tests.TestResource.Fixture2");
     var options = new RunSettings(assembly, new string[] {}, "feedback_pipe");
     var results = _runner.Run(options);
     Assert.That(results.Count(), Is.EqualTo(3));
 }
 public void can_all_tests_in_a_nested_class()
 {
     var runner = new Runner();
     var options = new AssemblyOptions(getAssembly());
     options.AddMember("AutoTest.TestRunners.SimpleTesting.Tests.Resources.more.MoreSimpleTestingTests+Nested");
     var settings = new RunSettings(options, new string[] { }, null);
     var result = runner.Run(settings);
     Assert.That(result.Count(), Is.EqualTo(1));
 }
Exemplo n.º 9
0
 public void Should_append_tests_from_abstract_class()
 {
     var assembly = new AssemblyOptions(Path.GetFullPath(@"AutoTest.TestRunners.MSTest.Tests.TestResource.dll"));
     assembly.AddMember("AutoTest.TestRunners.MSTest.Tests.TestResource.InheritingFromAbstractClass");
     var settings = new RunSettings(assembly, new string[] {}, null);
     
     var runner = new Runner();
     var result = runner.Run(settings);
     Assert.That(result.Count(), Is.EqualTo(1));
 }