Skip to content

Commit

Permalink
Merge branch 'master' into fix-scenario-cfg-command
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-nikonov committed Aug 15, 2024
2 parents 917ca9a + 70d9dac commit 29f3410
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
dotnet test .\clio.tests\clio.tests.csproj -nowarn:none `
/p:CollectCoverage=true /p:CoverletOutputFormat=opencover `
/p:CoverletOutput=".\..\TestResults\coverage.opencover.xml";
dotnet build-server shutdown;
$ErrorActionPreference = 'Stop'
dotnet test .\clio.tests\clio.tests.csproj -nowarn:none `
/p:CollectCoverage=true /p:CoverletOutputFormat=opencover `
/p:CoverletOutput=".\..\TestResults\coverage.opencover.xml";
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down
16 changes: 10 additions & 6 deletions clio.tests/Command/SchemaBuilderTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

namespace Clio.Tests.Command;

public class SchemaBuilderTestFixture : BaseClioModuleTests
{
public class SchemaBuilderTestFixture : BaseClioModuleTests {

#region Constants: Private

Expand All @@ -22,7 +21,7 @@ public class SchemaBuilderTestFixture : BaseClioModuleTests

#region Methods: Private

private void AssertOnDescriptor(string descriptorPath){
private void AssertOnDescriptor(string descriptorPath) {
string dContent = FileSystem.File.ReadAllText(descriptorPath);
JObject obj = JObject.Parse(dContent);
string schemaUid = (string)obj.SelectToken("$.Descriptor.UId");
Expand All @@ -35,7 +34,7 @@ private void AssertOnDescriptor(string descriptorPath){
modifiedOnUtc.Should().BeAfter(DateTime.MinValue);
}

private void AssertOnMetaData(string metadataPath){
private void AssertOnMetaData(string metadataPath) {
string dContent = FileSystem.File.ReadAllText(metadataPath);
JObject obj = JObject.Parse(dContent);

Expand All @@ -57,7 +56,7 @@ private void AssertOnMetaData(string metadataPath){
HD1.Should().Be(Guid.Parse("50E3ACC0-26FC-4237-A095-849A1D534BD3"));
}

private void AssertOnSchema(string schemaPath){
private void AssertOnSchema(string schemaPath) {
IPackageInfoProvider pif = Container.Resolve<IPackageInfoProvider>();
PackageInfo packageInfo = pif.GetPackageInfo(PackagePath);
string content = FileSystem.File.ReadAllText(schemaPath);
Expand All @@ -71,7 +70,7 @@ private void AssertOnSchema(string schemaPath){

#region Methods: Public

public override void Setup(){
public override void Setup() {
base.Setup();
string tplFileContent = File.ReadAllText("tpl/schemas-template/source-code/Resources/resource.en-US.xml.tpl");
FileSystem.AddFile("E:\\Clio\\tpl\\schemas-template\\source-code\\Resources\\resource.en-US.xml.tpl",
Expand Down Expand Up @@ -100,6 +99,11 @@ public override void Setup(){
WorkingDirectoriesProvider._executingDirectory = "E:\\Clio";
}

[TearDown]
public void TearDown() {
WorkingDirectoriesProvider._executingDirectory = null;
}

#endregion

[Test]
Expand Down

0 comments on commit 29f3410

Please sign in to comment.