public void FindNavigationTargetShouldReturnSetIfItIsFound()
 {
     var testSubject = new CsdlSemanticsEntitySet(this.semanticContainer, this.csdlEntitySet);
     var result = testSubject.FindNavigationTarget(this.navigationProperty);
     result.Should().BeAssignableTo<CsdlSemanticsEntitySet>();
     result.As<CsdlSemanticsEntitySet>().Name.Should().Be("EntitySet");
     result.Errors().Should().BeEmpty();
 }
 public void FindNavigationTargetShouldReturnUnresolvedEntitySetIfEntitySetIsNotFound()
 {
     var nonExistentBinding = new CsdlNavigationPropertyBinding("Navigation", "NonExistent", null, new CsdlLocation(1, 1));
     var testSubject = new CsdlSemanticsEntitySet(this.semanticContainer, new CsdlEntitySet("Fake", "FQ.NS.EntityType", new[] { nonExistentBinding }, null, null));
     var result = testSubject.FindNavigationTarget(this.navigationProperty);
     result.Should().BeAssignableTo<UnresolvedEntitySet>();
     result.As<UnresolvedEntitySet>().Name.Should().Be("NonExistent");
     result.Errors().Should().Contain(e => e.ErrorLocation == nonExistentBinding.Location && e.ErrorCode == EdmErrorCode.BadUnresolvedEntitySet);
 }
 public void FindNavigationTargetShouldReturnNullIfNavigationPropertyHasNoBinding()
 {
     var testSubject = new CsdlSemanticsEntitySet(this.semanticContainer, this.csdlEntitySet);
     Assert.IsTrue(testSubject.FindNavigationTarget(new CsdlSemanticsNavigationProperty(this.semanticEntityType, new CsdlNavigationProperty("Fake", "FQ.NS.EntityType", null, null, false, null, Enumerable.Empty<CsdlReferentialConstraint>(), null, null))) is IEdmUnknownEntitySet);
 }