2018-09-14 19:24:12 +02:00
|
|
|
|
// ------------------------------------------------------------
|
|
|
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
|
|
|
|
|
// ------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using Microsoft.OData.Edm;
|
|
|
|
|
using Microsoft.OpenApi.OData.Properties;
|
|
|
|
|
using Microsoft.OpenApi.OData.Tests;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.OpenApi.OData.Edm.Tests
|
|
|
|
|
{
|
|
|
|
|
public class ODataPathHandlerTests
|
|
|
|
|
{
|
|
|
|
|
[Fact]
|
|
|
|
|
public void ODataPathConstructorThrowsArgumentNull1()
|
|
|
|
|
{
|
|
|
|
|
IEdmModel model = EdmModelHelper.GraphBetaModel;
|
|
|
|
|
ODataContext context = new ODataContext(model);
|
|
|
|
|
|
|
|
|
|
var handler = new ODataPathHandler(context);
|
|
|
|
|
|
|
|
|
|
var paths = handler.Paths;
|
|
|
|
|
Assert.NotNull(paths);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ODataPathProviderTests
|
|
|
|
|
{
|
|
|
|
|
[Fact]
|
|
|
|
|
public void ODataPathConstructorThrowsArgumentNull123()
|
|
|
|
|
{
|
|
|
|
|
IEdmModel model = EdmModelHelper.GraphBetaModel;
|
|
|
|
|
//ODataContext context = new ODataContext(model);
|
|
|
|
|
|
2018-09-15 02:00:21 +02:00
|
|
|
|
ODataPathProvider provider = new ODataPathProvider(model);
|
2018-09-14 19:24:12 +02:00
|
|
|
|
|
2018-09-15 02:00:21 +02:00
|
|
|
|
var paths = provider.CreatePaths();
|
2018-09-14 19:24:12 +02:00
|
|
|
|
|
|
|
|
|
Assert.NotNull(paths);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|