Skip to content

Commit

Permalink
Merge pull request #66 from difi/Upgrade_difi-felles-utility
Browse files Browse the repository at this point in the history
Bump from v0.5 to v0.6
  • Loading branch information
asjafjell authored Jun 16, 2016
2 parents 05adba2 + f9aaac2 commit 906ee8a
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<HintPath>..\packages\api-client-shared.1.0.5941.27271\lib\net45\ApiClientShared.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Difi.Felles.Utility, Version=0.5.5970.18522, Culture=neutral, PublicKeyToken=683b8efceae684a6, processorArchitecture=MSIL">
<HintPath>..\packages\difi-felles-utility-dotnet.0.5.5970.18522\lib\net45\Difi.Felles.Utility.dll</HintPath>
<Reference Include="Difi.Felles.Utility, Version=0.6.6008.19059, Culture=neutral, PublicKeyToken=683b8efceae684a6, processorArchitecture=MSIL">
<HintPath>..\packages\difi-felles-utility-dotnet.0.6.6008.19059\lib\net45\Difi.Felles.Utility.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Difi.Oppslagstjeneste.Klient.Domene/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="api-client-shared" version="1.0.5941.27271" targetFramework="net45" />
<package id="difi-felles-utility-dotnet" version="0.5.5970.18522" targetFramework="net45" />
<package id="difi-felles-utility-dotnet" version="0.6.6008.19059" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
<HintPath>..\packages\Common.Logging.Core.3.3.1\lib\net40\Common.Logging.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Difi.Felles.Utility, Version=0.5.5970.18522, Culture=neutral, PublicKeyToken=683b8efceae684a6, processorArchitecture=MSIL">
<HintPath>..\packages\difi-felles-utility-dotnet.0.5.5970.18522\lib\net45\Difi.Felles.Utility.dll</HintPath>
<Reference Include="Difi.Felles.Utility, Version=0.6.6008.19059, Culture=neutral, PublicKeyToken=683b8efceae684a6, processorArchitecture=MSIL">
<HintPath>..\packages\difi-felles-utility-dotnet.0.6.6008.19059\lib\net45\Difi.Felles.Utility.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="KellermanSoftware.Compare-NET-Objects, Version=3.4.0.0, Culture=neutral, PublicKeyToken=d970ace04cc85217, processorArchitecture=MSIL">
Expand Down
4 changes: 2 additions & 2 deletions Difi.Oppslagstjeneste.Klient.Tester/MiljøTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public void ReturnsInitializedFunctionalTestEnvironmentVer1()
Assert.IsNotNull(environment.CertificateChainValidator);
Assert.AreEqual(url, environment.Url.AbsoluteUri);
CollectionAssert.AreEqual(certificates, environment.CertificateChainValidator.SertifikatLager);
}

}

[TestMethod]
public void ReturnsInitializedFunctionalTestEnvironmentVer2()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void InitializesFields()
//Assert
Assert.AreEqual(environment, oppslagstjenesteConfiguration.Miljø);
Assert.AreEqual(senderUnitTestCertificate, oppslagstjenesteConfiguration.Avsendersertifikat);
Assert.AreEqual( forventetLoggForespørselOgRespons, oppslagstjenesteConfiguration.LoggForespørselOgRespons);
Assert.AreEqual(forventetLoggForespørselOgRespons, oppslagstjenesteConfiguration.LoggForespørselOgRespons);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion Difi.Oppslagstjeneste.Klient.Tester/Smoke/SmokeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public class SmokeTests
[ClassInitialize]
public static void Init(TestContext context)
{

var senderCertificate = CertificateResource.GetDifiTestCertificate();
var oppslagstjenesteConfiguration = new OppslagstjenesteKonfigurasjon(Miljø.FunksjoneltTestmiljøVerifikasjon1, senderCertificate);

Expand Down
2 changes: 1 addition & 1 deletion Difi.Oppslagstjeneste.Klient.Tester/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<package id="Common.Logging.Core" version="3.3.1" targetFramework="net45" />
<package id="CompareNETObjects" version="3.04.0.0" targetFramework="net45" />
<package id="CompareObjects" version="1.0.2" targetFramework="net45" />
<package id="difi-felles-utility-dotnet" version="0.5.5970.18522" targetFramework="net45" />
<package id="difi-felles-utility-dotnet" version="0.6.6008.19059" targetFramework="net45" />
<package id="Moq" version="4.2.1510.2205" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
<HintPath>..\packages\Common.Logging.Core.3.3.1\lib\net40\Common.Logging.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Difi.Felles.Utility, Version=0.5.5970.18522, Culture=neutral, PublicKeyToken=683b8efceae684a6, processorArchitecture=MSIL">
<HintPath>..\packages\difi-felles-utility-dotnet.0.5.5970.18522\lib\net45\Difi.Felles.Utility.dll</HintPath>
<Reference Include="Difi.Felles.Utility, Version=0.6.6008.19059, Culture=neutral, PublicKeyToken=683b8efceae684a6, processorArchitecture=MSIL">
<HintPath>..\packages\difi-felles-utility-dotnet.0.6.6008.19059\lib\net45\Difi.Felles.Utility.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
14 changes: 7 additions & 7 deletions Difi.Oppslagstjeneste.Klient/Miljø.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
using System;
using System.Security.Policy;
using Difi.Felles.Utility;
using Difi.Felles.Utility.Utilities;

namespace Difi.Oppslagstjeneste.Klient
{
public class Miljø
public class Miljø
{
public CertificateChainValidator CertificateChainValidator { get; set; }
public Uri Url { get; set; }

internal Miljø(Uri url, CertificateChainValidator certificateChainValidator)
{
CertificateChainValidator = certificateChainValidator;
Url = url;
}

public CertificateChainValidator CertificateChainValidator { get; set; }

public Uri Url { get; set; }

/// <summary>
/// Verifikasjon 1 skal benyttes av kunder som skal integrere seg mot Difis felleskomponenter og kan også benyttes til
/// feilsøking i etablerte integrasjoner.
Expand All @@ -31,8 +31,8 @@ internal Miljø(Uri url, CertificateChainValidator certificateChainValidator)

/// <summary>
/// Verifikasjon 2 blir brukt til testing av nye releaser av Difis felleskomponenter. Verifikasjon 2 kan benyttes til å
/// teste tjenester som er planlagt frem i tid. Ved oppgradering av verifikasjon 2 til nye releaser, vil Difi kunne stenge tilgangen i
/// en kortere periode (1-2 dager). Dette blir varslet i forkant på samarbeidsportalen.
/// teste tjenester som er planlagt frem i tid. Ved oppgradering av verifikasjon 2 til nye releaser, vil Difi kunne
/// stenge tilgangen i en kortere periode (1-2 dager). Dette blir varslet i forkant på samarbeidsportalen.
/// Når Difis felleskomponenter oppgraderes, kan kunden teste sine eksisterende integrasjoner mot ny versjon i
/// verifikasjon 2 før den settes i produksjon.
/// </summary>
Expand Down
8 changes: 4 additions & 4 deletions Difi.Oppslagstjeneste.Klient/OppslagstjenesteHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
using Difi.Oppslagstjeneste.Klient.Utilities;
using Difi.Oppslagstjeneste.Klient.XmlValidation;


namespace Difi.Oppslagstjeneste.Klient
{
internal class OppslagstjenesteHelper
Expand Down Expand Up @@ -90,11 +89,12 @@ private static void ValidateRequest(AbstractEnvelope envelope)
{
var xml = envelope.XmlDocument;
var xmlValidator = new OppslagstjenesteXmlValidator();
var xmlValidert = xmlValidator.Validate(xml.OuterXml);
string validationMessages;
var xmlValidert = xmlValidator.Validate(xml.OuterXml, out validationMessages);
if (!xmlValidert)
{
Log.Warn($"Utgående forespørsel validerte ikke: {xmlValidator.ValidationWarnings}");
throw new XmlException(xmlValidator.ValidationWarnings);
Log.Warn($"Utgående forespørsel validerte ikke: {validationMessages}");
throw new XmlException(validationMessages);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Difi.Oppslagstjeneste.Klient/OppslagstjenesteKlient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Difi.Oppslagstjeneste.Klient
public class OppslagstjenesteKlient
{
private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static readonly ILog RequestAndResponseLog = LogManager.GetLogger($"{typeof(OppslagstjenesteKlient).Namespace}.RequestResponse");
private static readonly ILog RequestAndResponseLog = LogManager.GetLogger($"{typeof (OppslagstjenesteKlient).Namespace}.RequestResponse");
private readonly OppslagstjenesteHelper _oppslagstjenesteHelper;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Difi.Oppslagstjeneste.Klient/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<package id="api-client-shared" version="1.0.5941.27271" targetFramework="net45" />
<package id="Common.Logging" version="3.3.1" targetFramework="net45" />
<package id="Common.Logging.Core" version="3.3.1" targetFramework="net45" />
<package id="difi-felles-utility-dotnet" version="0.5.5970.18522" targetFramework="net45" />
<package id="difi-felles-utility-dotnet" version="0.6.6008.19059" targetFramework="net45" />
</packages>

0 comments on commit 906ee8a

Please sign in to comment.