Ejemplo n.º 1
0
        public void EqualsNullTest()
        {
            IARoute route = new IARoute("GET", "/example");
            IARoute other = null;

            Assert.IsFalse(route.Equals(other));
        }
Ejemplo n.º 2
0
        public void EqualsResourceIsNullTest()
        {
            IARoute route = new IARoute("GET", null);
            IARoute other = new IARoute("GET", "/example");

            Assert.IsFalse(route.Equals(other));
            Assert.AreNotEqual(route.GetHashCode(), other.GetHashCode());
        }
Ejemplo n.º 3
0
        public void EqualsSelfTest()
        {
            IARoute route = new IARoute("GET", "/example");
            IARoute other = route;

            Assert.IsTrue(route.Equals(other));
            Assert.AreEqual(route.GetHashCode(), other.GetHashCode());
        }
Ejemplo n.º 4
0
        public void EqualsDifferentActionTest()
        {
            IARoute route = new IARoute("GET", "/example");
            IARoute other = new IARoute("PUT", "/example");

            Assert.IsFalse(route.Equals(other));
            Assert.AreNotEqual(route.GetHashCode(), other.GetHashCode());
        }