-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from microsoft/features/publish-20200405-1-ALL
Microsoft CDM Release Version Update: 1.0.9
- Loading branch information
Showing
22,008 changed files
with
3,807,799 additions
and
135,906 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -377,6 +377,7 @@ | |
color:mediumblue; | ||
padding: 3px; | ||
padding-left: 6px; | ||
white-space: pre-wrap; | ||
} | ||
|
||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,4 +219,4 @@ | |
|
||
</body> | ||
|
||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...rosoft.CommonDataModel.ObjectModel.Tests/Cdm/CdmTraitDefinition/CdmTraitDefinitionTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
namespace Microsoft.CommonDataModel.ObjectModel.Tests.Cdm | ||
{ | ||
using Microsoft.CommonDataModel.ObjectModel.Cdm; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
[TestClass] | ||
public class CdmTraitDefinitionTests | ||
{ | ||
[TestMethod] | ||
public void TestExtendsTraitPropertyOptional() | ||
{ | ||
var corpus = new CdmCorpusDefinition(); | ||
var extendTraitRef1 = new CdmTraitReference(corpus.Ctx, "testExtendTraitName1", true, false); | ||
var extendTraitRef2 = new CdmTraitReference(corpus.Ctx, "testExtendTraitName2", true, false); | ||
var traitDefinition = new CdmTraitDefinition(corpus.Ctx, "testTraitName", extendTraitRef1); | ||
|
||
Assert.AreEqual(extendTraitRef1, traitDefinition.ExtendsTrait); | ||
traitDefinition.ExtendsTrait = null; | ||
Assert.IsNull(traitDefinition.ExtendsTrait); | ||
|
||
traitDefinition.ExtendsTrait = extendTraitRef2; | ||
Assert.AreEqual(extendTraitRef2, traitDefinition.ExtendsTrait); | ||
traitDefinition.ExtendsTrait = null; | ||
Assert.IsNull(traitDefinition.ExtendsTrait); | ||
} | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
objectModel/CSharp/Microsoft.CommonDataModel.ObjectModel.Tests/Cdm/CorpusTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
namespace Microsoft.CommonDataModel.ObjectModel.Tests.Cdm | ||
{ | ||
using Microsoft.CommonDataModel.ObjectModel.Cdm; | ||
using Microsoft.CommonDataModel.ObjectModel.Utilities; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// Test methods for the CdmCorpusDefinition class. | ||
/// </summary> | ||
[TestClass] | ||
public class CorpusTests | ||
{ | ||
private readonly string testsSubpath = Path.Combine("Cdm", "Corpus"); | ||
|
||
/// <summary> | ||
/// Tests if a symbol imported with a moniker can be found as the last resource. | ||
/// When resolving symbolEntity with respect to wrtEntity, the symbol fromEntity should be found correctly. | ||
/// </summary> | ||
[TestMethod] | ||
public async Task TestResolveSymbolReference() | ||
{ | ||
var corpus = TestHelper.GetLocalCorpus(testsSubpath, "TestResolveSymbolReference"); | ||
corpus.SetEventCallback(new EventCallback | ||
{ | ||
Invoke = (CdmStatusLevel statusLevel, string message) => | ||
{ | ||
Assert.Fail(message); | ||
} | ||
}, CdmStatusLevel.Warning); | ||
|
||
var wrtEntity = await corpus.FetchObjectAsync<CdmEntityDefinition>("local:/wrtEntity.cdm.json/wrtEntity"); | ||
var resOpt = new ResolveOptions(wrtEntity, new AttributeResolutionDirectiveSet()); | ||
await wrtEntity.CreateResolvedEntityAsync("NewEntity", resOpt); | ||
} | ||
|
||
/// <summary> | ||
/// Tests if ComputeLastModifiedTimeAsync doesn't log errors related to reference validation. | ||
/// </summary> | ||
[TestMethod] | ||
public async Task TestComputeLastModifiedTimeAsync() | ||
{ | ||
var corpus = TestHelper.GetLocalCorpus(testsSubpath, "TestComputeLastModifiedTimeAsync"); | ||
corpus.SetEventCallback(new EventCallback | ||
{ | ||
Invoke = (level, message) => | ||
{ | ||
Assert.Fail(message); | ||
} | ||
}, CdmStatusLevel.Error); | ||
|
||
await corpus.ComputeLastModifiedTimeAsync("local:/default.manifest.cdm.json"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.