Пример #1
0
        public void ResolveFunctionImportFromContainerShouldReturnFunctionImportWhenNameIsFound()
        {
            IEdmOperationImport action = this.defaultContainer.ResolveOperationImports("SimpleAction").Single();

            action.Should().NotBeNull();
            action.FullName().Should().Be("Default.SimpleAction");

            action = this.defaultContainer.ResolveOperationImports("SimpleAction()").Single();
            action.Should().NotBeNull();
            action.FullName().Should().Be("Default.SimpleAction");

            this.defaultContainer.ResolveOperationImports("SimpleAction( )").Should().BeEmpty();
        }
Пример #2
0
        public void ResolveFunctionImportFromContainerShouldReturnFunctionImportWhenNameIsFound()
        {
            IEdmOperationImport action = this.defaultContainer.ResolveOperationImports("SimpleAction").Single();

            Assert.NotNull(action);
            Assert.Equal("Default.SimpleAction", action.FullName());

            action = this.defaultContainer.ResolveOperationImports("SimpleAction()").Single();
            Assert.NotNull(action);
            Assert.Equal("Default.SimpleAction", action.FullName());

            Assert.Empty(this.defaultContainer.ResolveOperationImports("SimpleAction( )"));
        }
Пример #3
0
        public void ResolveFunctionImportFromModelShouldReturnFunctionImportWhenNameIsFullyQualifiedAndFound()
        {
            IEdmOperationImport action1 = this.defaultContainer.ResolveOperationImports("Default.SimpleAction").Single();
            IEdmOperationImport action2 = this.defaultContainer.ResolveOperationImports("TestModel.Default.SimpleAction").Single();
            IEdmOperationImport action3 = this.defaultContainer.ResolveOperationImports("SimpleAction").Single();

            action1.Should().NotBeNull();
            action1.Should().Be(action2);
            action2.FullName().Should().Be("Default.SimpleAction");
            action3.Should().Be(action2);
        }
Пример #4
0
        public void ResolveFunctionImportFromModelShouldReturnFunctionImportWhenNameIsFullyQualifiedAndFound()
        {
            IEdmOperationImport action1 = this.defaultContainer.ResolveOperationImports("Default.SimpleAction").Single();
            IEdmOperationImport action2 = this.defaultContainer.ResolveOperationImports("TestModel.Default.SimpleAction").Single();
            IEdmOperationImport action3 = this.defaultContainer.ResolveOperationImports("SimpleAction").Single();

            Assert.NotNull(action1);
            Assert.Same(action1, action2);
            Assert.Equal("Default.SimpleAction", action2.FullName());
            Assert.Same(action3, action2);
        }