Example #1
0
 public void SetUp()
 {
     stateMachine = StateMachineBuilder.Build().WithLayers().WithSubStateMachines();
 }
 public void HasLayerByLayer()
 {
     StateMachinePack.StateMachine stateMachine = new StateMachinePack.StateMachine();
     Assert.IsNotNull(stateMachine.HasLayer(stateMachine.GetLayer(Layer.DEFAULTID)));
 }
 public void HasLayerByLayerWithNullLayer()
 {
     StateMachinePack.StateMachine stateMachine = new StateMachinePack.StateMachine();
     Assert.ThrowsException <ArgumentNullException>(() => stateMachine.HasLayer((Layer)null));
 }
 public void HasLayerByIdWithInvalidId()
 {
     StateMachinePack.StateMachine stateMachine = new StateMachinePack.StateMachine();
     Assert.ThrowsException <ArgumentException>(() => stateMachine.HasLayer("ALidaf?>?\\@!$!$#"));
 }
 public void HasLayerByIdWithNullId()
 {
     StateMachinePack.StateMachine stateMachine = new StateMachinePack.StateMachine();
     Assert.ThrowsException <NullReferenceException>(() => stateMachine.HasLayer((string)null));
 }
 public void HasLayerById()
 {
     StateMachinePack.StateMachine stateMachine = new StateMachinePack.StateMachine();
     Assert.IsTrue(stateMachine.HasLayer("DEFAULT"));
 }
 public void AddLayer3paramInListLocationWithInvalidIDLayerTest()
 {
     StateMachinePack.StateMachine stateMachine = new StateMachinePack.StateMachine();
     Assert.ThrowsException <ArgumentException>(() => stateMachine.AddLayer("ALidaf?>?\\@!$!$#"));
 }
 public void AddLayer2paramsDefaultWithSpacesLayerTest()
 {
     StateMachinePack.StateMachine stateMachine = new StateMachinePack.StateMachine();
     Assert.ThrowsException <ArgumentException>(() => stateMachine.AddLayer("          DEFAULT           "));
 }
 public void AddLayer2paramsNullIDLayerTest()
 {
     StateMachinePack.StateMachine stateMachine = new StateMachinePack.StateMachine();
     Assert.ThrowsException <NullReferenceException>(() => stateMachine.AddLayer(null));
 }
 public void HasLayerByLayer()
 {
     StateMachinePack.StateMachine stateMachine = new StateMachinePack.StateMachine();
     Assert.IsNotNull(stateMachine.HasLayer(new Layer("DEFAULT")));
 }