public void WhenNoGenericCollectionThenNoMatch()
        {
            var orm     = new Mock <IDomainInspector>();
            var pattern = new OneToManyPattern(orm.Object);

            pattern.Match(ForClass <MyClass> .Property(p => p.Something)).Should().Be.False();
        }
        public void WhenNoGenericCollectionThenNoMatch()
        {
            var orm = new Mock<IDomainInspector>();
            var pattern = new OneToManyPattern(orm.Object);

            pattern.Match(ForClass<MyClass>.Property(p => p.Something)).Should().Be.False();
        }
        public void WhenRelationIsOneToManyThenMatch()
        {
            var orm = new Mock<IDomainInspector>();
            var pattern = new OneToManyPattern(orm.Object);
            orm.Setup(x => x.IsOneToMany(It.Is<Type>(t => t == typeof (MyClass)), It.Is<Type>(t => t == typeof (Element)))).Returns(true);

            pattern.Match(ForClass<MyClass>.Property(p => p.Elements)).Should().Be.True();
        }
        public void WhenRelationIsNotOneToManyThenNoMatch()
        {
            var orm     = new Mock <IDomainInspector>();
            var pattern = new OneToManyPattern(orm.Object);

            orm.Setup(x => x.IsOneToMany(It.Is <Type>(t => t == typeof(MyClass)), It.Is <Type>(t => t == typeof(Element)))).Returns(false);

            pattern.Match(ForClass <MyClass> .Property(p => p.Elements)).Should().Be.False();
        }