Exemplo n.º 1
0
        public void Initialize(object testClass, NuwaTestCommand testCommand)
        {
            if (!_initialized)
            {
                foreach (var elem in _elements)
                {
                    elem.Initialize(this);
                }

                _initialized = true;
            }

            foreach (var elem in _elements)
            {
                elem.Recover(testClass, testCommand);
            }
        }
Exemplo n.º 2
0
 public override void Recover(object testClass, NuwaTestCommand testCommand)
 {
     SetBaseAddress(testClass, testCommand.Frame);
 }
Exemplo n.º 3
0
        public override IEnumerable<ITestCommand> EnumerateTestCommands(IMethodInfo testMethod)
        {
            /// TODO - Advanced feature:
            /// 1. Frame filter, some cases can be filtered under some frame
            var combinations = from test in Proxy.EnumerateTestCommands(testMethod)
                               from frame in _frames
                               select new { TestCommand = test, RunFrame = frame };

            foreach (var each in combinations)
            {
                var isSkipped =
                    (each.TestCommand is DelegatingTestCommand) ?
                    (each.TestCommand as DelegatingTestCommand).InnerCommand is SkipCommand :
                    (each.TestCommand is SkipCommand);

                if (isSkipped)
                {
                    yield return each.TestCommand;
                }
                else
                {
                    var testCommand = new NuwaTestCommand(each.TestCommand)
                    {
                        Frame = each.RunFrame,
                        TestMethod = testMethod
                    };

                    yield return testCommand;
                }
            }
        }