AjErl.Tests.Language.TupleTests.MatchTuplesWithAVariable C# (CSharp) Метод

MatchTuplesWithAVariable() приватный Метод

private MatchTuplesWithAVariable ( ) : void
Результат void
        public void MatchTuplesWithAVariable()
        {
            Tuple tuple = new Tuple(new object[] { 1, new Variable("X"), 3 });
            Tuple tuple2 = new Tuple(new object[] { 1, 2, 3 });
            Context context = new Context();
            Assert.IsTrue(tuple.Match(tuple2, context));
            Assert.AreEqual(2, context.GetValue("X"));

            Assert.IsTrue(tuple2.Match(tuple, context));

            Assert.AreEqual(2, context.GetValue("X"));
        }