コード例 #1
0
        public void HasRequiredNecessityShouldBeHasReuired()
        {
            var testSubject = new MappingRelationshipForeignKeyMatcherHasRequired(
                new CodeGenEscaper());

            testSubject.GetNecessity().Should().Be("HasRequired");
        }
コード例 #2
0
        public void HasRequiredShouldBeFalse()
        {
            var navigationProperty = this.builder
                                     .FromRole(this.posts, RelationshipMultiplicity.Many)
                                     .ToRole(this.tags, RelationshipMultiplicity.ZeroOrOne)
                                     .Map("ID", "Post_ID")
                                     .Build();

            var testSubject = new MappingRelationshipForeignKeyMatcherHasRequired(
                new CodeGenEscaper());

            testSubject.IsMatch(navigationProperty).Should().BeFalse();
        }