Example #1
0
        public void ReturnAListOfStepsWhenJsonIsCorrect()
        {
            var steps = StepsDeserializer.Deserialize(CORRECT_STEPS);

            Assert.IsNotEmpty(steps);
            Assert.IsInstanceOf <NavigateToUrl>(steps[0]);
            Assert.AreEqual("Google.com", (steps[0] as NavigateToUrl).Url);
            Assert.IsInstanceOf <ClickButton>(steps[1]);
            Assert.AreEqual("#BUTTON_ID", (steps[1] as ClickButton).Selector);
        }
Example #2
0
 public void ThrowAnExceptionWhenAStepIsNotSupported()
 {
     Assert.Throws(typeof(JsonSerializationException), () => StepsDeserializer.Deserialize(INCORRECT_STEPS));
 }