This repository has been archived by the owner on Nov 29, 2017. It is now read-only.
/
DbCommandTreeTests.cs
51 lines (43 loc) · 1.7 KB
/
DbCommandTreeTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
namespace System.Data.Entity.Core.Common.CommandTrees
{
using System.Collections.Generic;
using System.Data.Entity.Core.Common.CommandTrees.Internal;
using System.Data.Entity.Core.Metadata.Edm;
using Moq;
using Xunit;
public class DbCommandTreeTests : TestBase
{
public class ConcreteDbCommandTree : DbCommandTree
{
public ConcreteDbCommandTree(MetadataWorkspace workspace, DataSpace dataSpace)
: base(workspace, dataSpace)
{
}
public override DbCommandTreeKind CommandTreeKind
{
get { throw new NotImplementedException(); }
}
internal override IEnumerable<KeyValuePair<string, TypeUsage>> GetParameters()
{
throw new NotImplementedException();
}
internal override void DumpStructure(ExpressionDumper dumper)
{
throw new NotImplementedException();
}
internal override string PrintTree(ExpressionPrinter printer)
{
throw new NotImplementedException();
}
}
[Fact]
public void Data_space_and_workspace_are_set_from_constructor()
{
var workspace = new Mock<MetadataWorkspace>().Object;
var tree = new ConcreteDbCommandTree(workspace, DataSpace.CSpace);
Assert.Same(workspace, tree.MetadataWorkspace);
Assert.Equal(DataSpace.CSpace, tree.DataSpace);
}
}
}