Esempio n. 1
0
        public void DefaultValues()
        {
            var sut = new UncheckedBlock();

            Assert.AreEqual(Lists.NewList <IStatement>(), sut.Body);
            Assert.AreNotEqual(0, sut.GetHashCode());
            Assert.AreNotEqual(1, sut.GetHashCode());
        }
Esempio n. 2
0
        public void Equality_Default()
        {
            var a = new UncheckedBlock();
            var b = new UncheckedBlock();

            Assert.AreEqual(a, b);
            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
        }
Esempio n. 3
0
        public void Equality_DifferentBody()
        {
            var a = new UncheckedBlock();

            a.Body.Add(new BreakStatement());
            var b = new UncheckedBlock();

            Assert.AreNotEqual(a, b);
            Assert.AreNotEqual(a.GetHashCode(), b.GetHashCode());
        }
Esempio n. 4
0
        public void Equality_ReallyTheSame()
        {
            var a = new UncheckedBlock();

            a.Body.Add(new BreakStatement());
            var b = new UncheckedBlock();

            b.Body.Add(new BreakStatement());
            Assert.AreEqual(a, b);
            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
        }