public void TestInputTransition()
{
var m = new Marking(1, new Dictionary<int, int>
{
{ 0, 0 }
});
var p = new MatrixPetriNet("p",
new Dictionary<int, string> {
{0, "p0"}
},
new Dictionary<int, string>
{
{ 0, "Ti" }
},
new Dictionary<int, List<InArc>>() { },
new Dictionary<int, List<OutArc>>(){
{0, new List<OutArc>(){new OutArc(0)}}
});
Assert.AreEqual(0, m[0]);
Assert.IsTrue(p.IsEnabled(0, m));
m = p.Fire(m);
Assert.AreEqual(1, m[0]);
Assert.IsTrue(p.IsEnabled(0, m));
m = p.Fire(m);
Assert.AreEqual(2, m[0]);
Assert.IsTrue(p.IsEnabled(0, m));
}