public void MatchManyToManyWithMixCollectionAndDictionary()
 {
     var orm = new Mock<IDomainInspector>();
     var pattern = new BidirectionalManyToManyPattern();
     pattern.Match(typeof(UserMix).GetProperty("RolesMap")).Should().Be.True();
     pattern.Match(typeof(RoleMix).GetProperty("Users")).Should().Be.True();
 }
Example #2
0
        public void MatchManyToManyInPlainCollection()
        {
            var pattern = new BidirectionalManyToManyPattern();

            pattern.Match(typeof(User).GetProperty("Roles")).Should().Be.True();
            pattern.Match(typeof(Role).GetProperty("Users")).Should().Be.True();
        }
Example #3
0
        public void MatchManyToManyWithMixCollectionAndDictionary()
        {
            var orm     = new Mock <IDomainInspector>();
            var pattern = new BidirectionalManyToManyPattern();

            pattern.Match(typeof(UserMix).GetProperty("RolesMap")).Should().Be.True();
            pattern.Match(typeof(RoleMix).GetProperty("Users")).Should().Be.True();
        }
Example #4
0
        public void NoMatchManyToOne()
        {
            var orm     = new Mock <IDomainInspector>();
            var pattern = new BidirectionalManyToManyPattern();

            pattern.Match(typeof(Child).GetProperty("Parent")).Should().Be.False();
        }
 public void NoMatchOneToMany()
 {
     var pattern = new BidirectionalManyToManyPattern();
     pattern.Match(typeof(Parent).GetProperty("Children")).Should().Be.False();
 }
 public void NoMatchManyToOne()
 {
     var orm = new Mock<IDomainInspector>();
     var pattern = new BidirectionalManyToManyPattern();
     pattern.Match(typeof(Child).GetProperty("Parent")).Should().Be.False();
 }
 public void MatchManyToManyInPlainCollection()
 {
     var pattern = new BidirectionalManyToManyPattern();
     pattern.Match(typeof(User).GetProperty("Roles")).Should().Be.True();
     pattern.Match(typeof(Role).GetProperty("Users")).Should().Be.True();
 }
 public void MatchManyToManyInDictionaryValue()
 {
     var pattern = new BidirectionalManyToManyPattern();
     pattern.Match(typeof(UserMap).GetProperty("RolesMap")).Should().Be.True();
 }
Example #9
0
        public void MatchManyToManyInDictionaryKey()
        {
            var pattern = new BidirectionalManyToManyPattern();

            pattern.Match(typeof(RoleMap).GetProperty("UsersMap")).Should().Be.True();
        }
Example #10
0
        public void NoMatchOneToMany()
        {
            var pattern = new BidirectionalManyToManyPattern();

            pattern.Match(typeof(Parent).GetProperty("Children")).Should().Be.False();
        }