Skip to content

Commit

Permalink
Merge pull request #2066 from FirelyTeam/feature/update-4.0.0-stu3-wi…
Browse files Browse the repository at this point in the history
…th-3.8.3-stu3

Update 4.0.0-stu3 with 3.8.3-stu3 (preparing for release)
  • Loading branch information
marcovisserFurore authored May 3, 2022
2 parents 40d43b4 + f8a7002 commit 02bc928
Show file tree
Hide file tree
Showing 58 changed files with 5,387 additions and 457 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/AddIssuesToProject.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Add isuses to project

on:
issues:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/FirelyTeam/projects/6
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
10 changes: 9 additions & 1 deletion build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ trigger:
name: $(date:yyyyMMdd)$(rev:.r)

variables:
- group: CodeSigning
- template: build-variables.yml
- template: pipeline-variables.yml

Expand Down Expand Up @@ -71,7 +72,7 @@ stages:
inputs:
command: build
projects: ./Hl7.Fhir.sln
arguments: --configuration $(buildConfiguration) --no-restore
arguments: --configuration $(buildConfiguration) --no-restore /p:ContinuousIntegrationBuild=true

- task: DotNetCoreCLI@2
displayName: Create Test artifacts
Expand Down Expand Up @@ -118,6 +119,13 @@ stages:
configurationToPack: $(buildConfiguration)
nobuild: true
verbosityPack: Normal

- template: codesign-nuget-packages.yml@templates
parameters:
certificateValue: $(FirelyCodeSignerCertificate)
certificatePasswordValue: $(CodeSigningPassword)
packagePaths: $(Build.ArtifactStagingDirectory)\*.nupkg

- task: PublishBuildArtifacts@1
displayName: Publish Artifact
inputs:
Expand Down
2 changes: 1 addition & 1 deletion common
28 changes: 12 additions & 16 deletions src/Hl7.Fhir.Core.Tests/Model/ModelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@
* available at https://raw.githubusercontent.com/FirelyTeam/firely-net-sdk/master/LICENSE
*/

using FluentAssertions;
using Hl7.Fhir.Model;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Hl7.Fhir.Model;
using System.Xml.Linq;
using System.ComponentModel.DataAnnotations;
using Hl7.Fhir.Validation;
using Hl7.Fhir.Serialization;
using FluentAssertions;

namespace Hl7.Fhir.Tests.Model
{
Expand All @@ -36,14 +32,14 @@ public void ValidateElementAssertions()
}

[TestMethod]
public void OperationOutcomeLocation()
public void OperationOutcomeExpression()
{
OperationOutcome oo = new OperationOutcome();
oo.Issue.Add(new OperationOutcome.IssueComponent()
{
Location = new string[] { "yes" }
Expression = new string[] { "this" }
});
Assert.AreEqual(1, oo.Issue[0].Location.Count());
Assert.AreEqual(1, oo.Issue[0].Expression.Count());
}

[TestMethod]
Expand Down Expand Up @@ -72,7 +68,7 @@ public void DateTimeHandling()
[TestMethod]
public void TestTryToDateTimeOffset()
{
var fdt = new FhirDateTime(new DateTimeOffset(2021, 3, 18, 12, 22, 35, 999, new TimeSpan(-4, 0, 0)));
var fdt = new FhirDateTime(new DateTimeOffset(2021, 3, 18, 12, 22, 35, 999, new TimeSpan(-4, 0, 0)));
Assert.AreEqual("2021-03-18T12:22:35.999-04:00", fdt.Value);

Assert.IsTrue(fdt.TryToDateTimeOffset(out var dto1));
Expand All @@ -87,7 +83,7 @@ public void TestTryToDateTimeOffset()
fdt = new FhirDateTime("2021-03-18T12:22:35.999Z");
Assert.IsTrue(fdt.TryToDateTimeOffset(out var dto3));
Assert.AreEqual("2021-03-18T12:22:35.9990000+00:00", dto3.ToString("o"));

fdt = new FhirDateTime("2021-03-18T12:22:35.1234+04:00");
Assert.IsTrue(fdt.TryToDateTimeOffset(out var dto4));
Assert.AreEqual("2021-03-18T12:22:35.1234000+04:00", dto4.ToString("o"));
Expand All @@ -100,7 +96,7 @@ public void TestTryToDateTimeOffset()
[TestMethod]
public void TodayTests()
{
var todayLocal = Date.Today();
var todayLocal = Date.Today();
Assert.AreEqual(DateTimeOffset.Now.ToString("yyy-MM-dd"), todayLocal.Value);

var todayUtc = Date.UtcToday();
Expand Down Expand Up @@ -135,7 +131,7 @@ public void TestBundleLinkEncoding()
var uriEncodedUrl = string.Format(urlFormat, Uri.EscapeDataString(param1), Uri.EscapeDataString(param2));
Assert.AreEqual(manuallyEncodedUrl, uriEncodedUrl);
var uri = new Uri(manuallyEncodedUrl, UriKind.RelativeOrAbsolute);
var bundle = new Bundle {SelfLink = uri};
var bundle = new Bundle { SelfLink = uri };
if (uri.IsAbsoluteUri)
{
Assert.AreEqual(uri.AbsoluteUri, bundle.SelfLink.AbsoluteUri);
Expand Down Expand Up @@ -454,7 +450,7 @@ public void TestNamingSystemCanonical()
Assert.IsNull(ns.UrlElement);

ns.UniqueId.Add(new NamingSystem.UniqueIdComponent { Value = "http://nu.nl" });
ns.UniqueId.Add(new NamingSystem.UniqueIdComponent { Value = "http://dan.nl", Preferred=true });
ns.UniqueId.Add(new NamingSystem.UniqueIdComponent { Value = "http://dan.nl", Preferred = true });

Assert.AreEqual("http://dan.nl", ns.Url);
Assert.AreEqual("http://dan.nl", ns.UrlElement.Value);
Expand Down Expand Up @@ -621,7 +617,7 @@ public void TestCheckMinorVersionCompatibiliy()
Assert.IsTrue(ModelInfo.CheckMinorVersionCompatibility("3.0.1"));
Assert.IsTrue(ModelInfo.CheckMinorVersionCompatibility("3.0"));
Assert.IsTrue(ModelInfo.CheckMinorVersionCompatibility("3.0.2"));
Assert.IsFalse(ModelInfo.CheckMinorVersionCompatibility("3"));
Assert.IsFalse(ModelInfo.CheckMinorVersionCompatibility("3"));
}

[TestMethod]
Expand Down
Loading

0 comments on commit 02bc928

Please sign in to comment.