public void Equality_Default()
        {
            var a = new IndexAccessReference();
            var b = new IndexAccessReference();

            Assert.AreEqual(a, b);
            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
        }
        public void SettingValues()
        {
            var sut = new IndexAccessReference {
                Expression = SomeIndexAccess
            };

            Assert.AreEqual(SomeIndexAccess, sut.Expression);
        }
        public void DefaultValues()
        {
            var sut = new IndexAccessReference();

            Assert.AreEqual(new IndexAccessExpression(), sut.Expression);
            Assert.AreNotEqual(0, sut.GetHashCode());
            Assert.AreNotEqual(1, sut.GetHashCode());
        }
        public void Equality_DifferentName()
        {
            var a = new IndexAccessReference {
                Expression = SomeIndexAccess
            };
            var b = new IndexAccessReference();

            Assert.AreNotEqual(a, b);
            Assert.AreNotEqual(a.GetHashCode(), b.GetHashCode());
        }
        public void Equality_ReallyTheSame()
        {
            var a = new IndexAccessReference {
                Expression = SomeIndexAccess
            };
            var b = new IndexAccessReference {
                Expression = SomeIndexAccess
            };

            Assert.AreEqual(a, b);
            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
        }
        public void IndexAccessReference()
        {
            var sst = new IndexAccessReference
            {
                Expression = new IndexAccessExpression
                {
                    Reference = new VariableReference {
                        Identifier = "arr"
                    },
                    Indices = { new ConstantValueExpression {
                                    Value = "1"
                                } }
                }
            };

            AssertPrint(sst, "arr[1]");
        }
        public void VisitorIsImplemented()
        {
            var sut = new IndexAccessReference();

            sut.Accept(23).Verify(v => v.Visit(sut, 23));
        }