Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request #147 from TrevorPilley/4.2.x
Browse files Browse the repository at this point in the history
4.2.1
  • Loading branch information
TrevorPilley authored Jan 2, 2020
2 parents 02243ca + 1d362aa commit d8724dd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
21 changes: 15 additions & 6 deletions Net.Http.WebApi.OData.Tests/Query/SelectExpandQueryOptionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public WhenConstructedWithExpandSingleValue()
}

[Fact]
public void ThePropertiesShouldContainEachSpecifiedValue()
public void ThePropertiesShouldContainSpecifiedNavigationProperty()
{
Assert.Equal(1, this.option.Properties.Count);

Expand Down Expand Up @@ -52,7 +52,7 @@ public WhenConstructedWithExpandStarValue()
}

[Fact]
public void ThePropertiesShouldContainEachExpandableProperty()
public void ThePropertiesShouldContainAllNavigationProperties()
{
Assert.Equal(1, this.option.Properties.Count);

Expand Down Expand Up @@ -82,7 +82,7 @@ public WhenConstructedWithSelectMultipleValues()
}

[Fact]
public void ThePropertiesShouldContainEachSpecifiedValue()
public void ThePropertiesShouldContainSpecifiedProperties()
{
Assert.Equal(3, this.option.Properties.Count);

Expand Down Expand Up @@ -114,7 +114,7 @@ public WhenConstructedWithSelectSingleValue()
}

[Fact]
public void ThePropertiesShouldContainEachSpecifiedValue()
public void ThePropertiesShouldContainSpecifiedProperty()
{
Assert.Equal(1, this.option.Properties.Count);

Expand Down Expand Up @@ -144,9 +144,18 @@ public WhenConstructedWithSelectStarValue()
}

[Fact]
public void ThePropertiesShouldContainEachProperty()
public void ThePropertiesShouldContainAllProperties()
{
Assert.Same(this.option.Properties, this.model.Properties);
Assert.Equal(8, this.option.Properties.Count);

Assert.Equal("Colour", this.option.Properties[0].Name);
Assert.Equal("Deleted", this.option.Properties[1].Name);
Assert.Equal("Description", this.option.Properties[2].Name);
Assert.Equal("Name", this.option.Properties[3].Name);
Assert.Equal("Price", this.option.Properties[4].Name);
Assert.Equal("ProductId", this.option.Properties[5].Name);
Assert.Equal("Rating", this.option.Properties[6].Name);
Assert.Equal("ReleaseDate", this.option.Properties[7].Name);
}

[Fact]
Expand Down
2 changes: 1 addition & 1 deletion Net.Http.WebApi.OData/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
// by using the '*' as shown below:
[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
[assembly: AssemblyInformationalVersion("4.2.0.0")]
[assembly: AssemblyInformationalVersion("4.2.1.0")]
[assembly: CLSCompliant(true)]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]
[assembly: InternalsVisibleTo("Net.Http.WebApi.OData.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010099315584ff23b0d08b9120b4ae0da0c7dd9eb581f7b9f92dba164c86a5825dc53d147adf436c0ec9b2584ffdee592b2bb82367f90942dcc020b2ef21169eee345c623446e41dae7ce58e981c8bbcadb7866724028d8a73b321bd65b0536a23715d1b6221be7ef2f6cc37d9b42c0cd892bda118f59453447a39d33d992a23c5ce")]
Expand Down
2 changes: 1 addition & 1 deletion Net.Http.WebApi.OData/Query/SelectExpandQueryOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal SelectExpandQueryOption(string rawValue, EdmComplexType model)
{
if (rawValue == "$select=*")
{
this.Properties = model.Properties;
this.Properties = model.Properties.Where(p => !p.IsNavigable).ToList();
}
else if (rawValue == "$expand=*")
{
Expand Down

0 comments on commit d8724dd

Please sign in to comment.