Exemplo n.º 1
0
        public void MappingNodeLoaded()
        {
            const string yaml = @"---
test:
  prop1: test-value
";
            var          node = Load(yaml);

            var result = (TestBlock)loader.Load(suite, "test", node, new YamlParser());

            result.Prop1.Should().Be("test-value");

            output.Warnings.Should().BeEmpty();
        }
Exemplo n.º 2
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        TestLoader test = (TestLoader)target;

        string path = Application.dataPath + "/" + "TestInfo.txt";

        GUILayout.BeginHorizontal();
        bool saveButton = GUILayout.Button("Save");
        bool loadButton = GUILayout.Button("Load");

        GUILayout.EndHorizontal();

        if (saveButton)
        {
            TestLoader      saver = new TestLoader();
            TestLoader.Data name  = new TestLoader.Data();

            saver.Save(name, path);

            Debug.Log("saved. " + path);
        }

        if (loadButton)
        {
            TestLoader loader = new TestLoader();

            Debug.Log("Loaded");
            Debug.Log(loader.Load(path).anotherShit);
        }
    }
Exemplo n.º 3
0
        public void CanLoadSuiteFromAssembly()
        {
            Assembly thisAssembly = Assembly.GetExecutingAssembly();
            ITest    suite        = TestLoader.Load(thisAssembly);

            Assert.That(suite.TestCaseCount, Is.GreaterThan(100));
            Assert.That(suite.Name, Is.EqualTo(thisAssembly.GetName().Name));

            // Don't run! It would recurse infinitely on this test.
        }
Exemplo n.º 4
0
        public void Add(Assembly assembly)
        {
            if (assembly == null)
            {
                throw new ArgumentNullException("assembly");
            }

            // TestLoader.Load always return a TestSuite so we can avoid casting many times
            suites.Add(TestLoader.Load(assembly) as TestSuite);
        }
Exemplo n.º 5
0
        public void Add(Assembly assembly)
        {
            if (assembly == null)
            {
                throw new ArgumentNullException("assembly");
            }

            // this can be called many times but we only want to load them
            // once since we need to share them across most activities
            if (!Initialized)
            {
                // TestLoader.Load always return a TestSuite so we can avoid casting many times
                TestSuite ts = TestLoader.Load(assembly) as TestSuite;
                AndroidRunner.AssemblyLevel.Add(ts);
                Add(ts);
            }
        }