public void FinalizingActionWithTheSameNameShouldReplaceAction()
        {
            var builder = new StepBuilder(new ProcessBuilder(id: "p_1"), id: "123", name: "Start", description: "Start Step");

            builder.Action().Name("a1").Description("Provide Documentation").Skippable(false).Done();
            Assert.IsNotNull(builder.Actions);
            Assert.AreEqual(1, builder.Actions.Count);
            Assert.AreEqual("a1", builder.Actions[0].ActionName);
            Assert.AreEqual("Provide Documentation", builder.Actions[0].ActionDescription);
            Assert.IsFalse(builder.Actions[0].IsSkippable);
            builder.Action().Name("a1").Description("New Documentation").Skippable(true).Done();
            Assert.AreEqual("New Documentation", builder.Actions[0].ActionDescription);
            Assert.IsTrue(builder.Actions[0].IsSkippable);
        }
 public void FinalizeActionWithoutNameSouldThrowException()
 {
     Assert.Throws <ArgumentNullException>(() => {
         var builder = new StepBuilder(new ProcessBuilder(id: "p_1"), id: "123", name: "Start", description: "Start Step");
         builder.Action().Description("Provide Documentation").Skippable(false).Done();
     });
 }
        public void RemoveActionShouldCallRemoveOnPArent()
        {
            var builder = new StepBuilder(new ProcessBuilder(id: "p_1"), id: "123", name: "Start", description: "Start Step");

            builder.Action().Name("a1").Description("Provide Documentation").Skippable(false).Done();
            Assert.IsNotNull(builder.Actions);
            Assert.AreEqual(1, builder.Actions.Count);
            builder.Actions[0].Remove();
            Assert.IsNotNull(builder.Actions);
            Assert.AreEqual(0, builder.Actions.Count);
        }