Beispiel #1
0
        private TestStepCollection GetTestSteps(string definition, ITestStepFactory factory)
        {
            var steps = new TestStepCollection();

            if (!string.IsNullOrWhiteSpace(definition))
            {
                var split = definition.Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries);
                foreach (var line in split)
                {
                    var testStep = factory.Create(line);
                    if (testStep != null)
                    {
                        steps.Add(testStep);
                    }
                }
            }

            return(steps);
        }
Beispiel #2
0
        public void ShouldParseLoadAssembly_WithNoParam()
        {
            // Arrange
            var command = "!loadAssembly";

            // Act
            var step = testFactory.Create(command) as LoadAssemblyStep;

            // Assert
            step.ShouldNotBeNull();
            step.AssemblyPath.ShouldBeNull();
        }