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(); }
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 NoMatchManyToOne() { var orm = new Mock <IDomainInspector>(); var pattern = new BidirectionalManyToManyPattern(); pattern.Match(typeof(Child).GetProperty("Parent")).Should().Be.False(); }
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(); }
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 MatchManyToManyInDictionaryValue() { var pattern = new BidirectionalManyToManyPattern(); pattern.Match(typeof(UserMap).GetProperty("RolesMap")).Should().Be.True(); }
public void MatchManyToManyInDictionaryKey() { var pattern = new BidirectionalManyToManyPattern(); pattern.Match(typeof(RoleMap).GetProperty("UsersMap")).Should().Be.True(); }