Exemple #1
0
        public void TestAddReaction_IReaction_int()
        {
            ReactionChain chain     = new ReactionChain();
            IReaction     reaction1 = builder.NewReaction();

            reaction1.Id = "reaction1";
            IReaction reaction2 = builder.NewReaction();

            reaction1.Id = "reaction2";
            IReaction reaction3 = builder.NewReaction();

            reaction1.Id = "reaction3";
            chain.Add(reaction1, 0);
            chain.Add(reaction2, 1);
            chain.Add(reaction3, 2);

            Assert.IsNotNull(chain);
        }
Exemple #2
0
        public void TestGetReaction_int()
        {
            ReactionChain chain     = new ReactionChain();
            IReaction     reaction1 = builder.NewReaction();

            reaction1.Id = "reaction1";
            chain.Add(reaction1, 0);
            IReaction reaction2 = builder.NewReaction();

            reaction1.Id = "reaction2";
            IReaction reaction3 = builder.NewReaction();

            reaction1.Id = "reaction3";
            chain.Add(reaction1, 0);
            chain.Add(reaction2, 1);
            chain.Add(reaction3, 2);

            Assert.AreEqual(reaction2, chain[1]);
        }