public void SetV4ODataPrefixWritingTrue(ODataVersion?version) { var options = new ODataSimplifiedOptions(version); options.SetOmitODataPrefix(true, ODataVersion.V4); options.GetOmitODataPrefix().Should().Be(version != null && version != ODataVersion.V4); options.GetOmitODataPrefix(ODataVersion.V4).Should().BeTrue(); options.GetOmitODataPrefix(ODataVersion.V401).Should().BeTrue(); options.EnableWritingODataAnnotationWithoutPrefix.Should().Be(version != null && version != ODataVersion.V4); }
public void SetV4ODataPrefixWritingTrue(ODataVersion?version) { var options = new ODataSimplifiedOptions(version); options.SetOmitODataPrefix(true, ODataVersion.V4); Assert.Equal(version != null && version != ODataVersion.V4, options.GetOmitODataPrefix()); Assert.True(options.GetOmitODataPrefix(ODataVersion.V4)); Assert.True(options.GetOmitODataPrefix(ODataVersion.V401)); Assert.Equal(version != null && version != ODataVersion.V4, options.GetOmitODataPrefix()); }
public void SetDefaultODataPrefixWritingFalse(ODataVersion?version) { var options = new ODataSimplifiedOptions(version); options.SetOmitODataPrefix(false); options.GetOmitODataPrefix().Should().BeFalse(); options.GetOmitODataPrefix(ODataVersion.V4).Should().BeFalse(); options.GetOmitODataPrefix(ODataVersion.V401).Should().BeFalse(); options.EnableWritingODataAnnotationWithoutPrefix.Should().BeFalse(); }
public void SetDefaultEnableWritingODataAnnotationWithoutPrefixTrue() { var options = new ODataSimplifiedOptions(); options.EnableWritingODataAnnotationWithoutPrefix = true; options.GetOmitODataPrefix().Should().BeTrue(); options.GetOmitODataPrefix(ODataVersion.V4).Should().BeTrue(); options.GetOmitODataPrefix(ODataVersion.V401).Should().BeTrue(); options.EnableWritingODataAnnotationWithoutPrefix.Should().BeTrue(); }
public void SetDefaultODataPrefixWritingFalse(ODataVersion?version) { var options = new ODataSimplifiedOptions(version); options.SetOmitODataPrefix(false); Assert.False(options.GetOmitODataPrefix()); Assert.False(options.GetOmitODataPrefix(ODataVersion.V4)); Assert.False(options.GetOmitODataPrefix(ODataVersion.V401)); Assert.False(options.GetOmitODataPrefix()); }
public void SetDefaultEnableWritingODataAnnotationWithoutPrefixTrue() { var options = new ODataSimplifiedOptions(); options.SetOmitODataPrefix(true); Assert.True(options.GetOmitODataPrefix()); Assert.True(options.GetOmitODataPrefix(ODataVersion.V4)); Assert.True(options.GetOmitODataPrefix(ODataVersion.V401)); Assert.True(options.GetOmitODataPrefix()); }
public void SetEnableWritingODataAnnotationWithoutPrefixFalse(ODataVersion?version) { var options = new ODataSimplifiedOptions(version); options.SetOmitODataPrefix(false); Assert.False(options.GetOmitODataPrefix()); Assert.False(options.GetOmitODataPrefix(ODataVersion.V4)); Assert.False(options.GetOmitODataPrefix(ODataVersion.V401)); Assert.False(options.GetOmitODataPrefix()); }
public void SetV401ODataPrefixWritingFalse(ODataVersion?version) { var options = new ODataSimplifiedOptions(version); options.SetOmitODataPrefix(false, ODataVersion.V401); Assert.Equal(version != null && version != ODataVersion.V4, options.GetOmitODataPrefix()); Assert.False(options.GetOmitODataPrefix(ODataVersion.V4)); Assert.False(options.GetOmitODataPrefix(ODataVersion.V401)); Assert.Equal(version != null && version != ODataVersion.V4, options.EnableWritingODataAnnotationWithoutPrefix); }
public void Validate401Options() { var options = new ODataSimplifiedOptions(ODataVersion.V401); options.EnableWritingKeyAsSegment.Should().BeFalse(); options.EnableReadingKeyAsSegment.Should().BeFalse(); options.EnableParsingKeyAsSegmentUrl.Should().BeTrue(); options.EnableReadingODataAnnotationWithoutPrefix.Should().BeTrue(); options.EnableWritingODataAnnotationWithoutPrefix.Should().BeTrue(); options.GetOmitODataPrefix().Should().BeTrue(); options.GetOmitODataPrefix(ODataVersion.V4).Should().BeFalse(); options.GetOmitODataPrefix(ODataVersion.V401).Should().BeTrue(); }
public void Validate401Options() { var options = new ODataSimplifiedOptions(ODataVersion.V401); Assert.False(options.EnableWritingKeyAsSegment); Assert.False(options.EnableReadingKeyAsSegment); Assert.True(options.EnableParsingKeyAsSegmentUrl); Assert.True(options.EnableReadingODataAnnotationWithoutPrefix); Assert.True(options.GetOmitODataPrefix()); Assert.True(options.GetOmitODataPrefix()); Assert.False(options.GetOmitODataPrefix(ODataVersion.V4)); Assert.True(options.GetOmitODataPrefix(ODataVersion.V401)); }