public void Flow_Definition_With_State_And_Event_And_1_Action() { string jsonContent = @" { ""States"":[ { ""Name"": ""name of first state"", ""Events"": [ { ""Name"": ""name of the event"", ""Actions"": [ { } ] } ] } ] } "; var creator = new JSonFlowDefinitionCreator(jsonContent); var definition = creator.Create(); Assert.AreEqual(1, definition.GetStates().First().GetEvents().First().GetActions().Count); }
public void Flow_Definition_With_No_State() { string jsonContent = @" { ""States"":[] } "; var creator = new JSonFlowDefinitionCreator(jsonContent); var definition = creator.Create(); Assert.AreEqual(0, definition.GetStates().Count); }
public void Flow_Definition_With_State_Name() { string jsonContent = @" { ""States"":[ { ""Name"": ""name of first state"" } ] } "; var creator = new JSonFlowDefinitionCreator(jsonContent); var definition = creator.Create(); Assert.AreEqual("name of first state", definition.GetStates().First().Name); }