Skip to content

Commit

Permalink
fixed tests between Debug and Release
Browse files Browse the repository at this point in the history
  • Loading branch information
phillip-haydon committed Sep 11, 2023
1 parent 11608d1 commit d307150
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AssemblyOriginatorKeyFile>..\Raygun.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AssemblyOriginatorKeyFile>..\Raygun.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@
<!-- Versions which are supported by Microsoft @ May 2022-->
<TargetFrameworks>net6.0;net48;net472;net471;net47;net462</TargetFrameworks>
<AssemblyVersion>1.0.0</AssemblyVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AssemblyOriginatorKeyFile>..\Raygun.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NUnit" Version="3.10.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.1" />
<PackageReference Include="skwas.MockHttp" Version="4.0.1" />
<PackageReference Include="StrongNamer" Version="0.2.5" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="skwas.MockHttp" Version="4.1.1" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 7 additions & 2 deletions Mindscape.Raygun4Net.NetCore.Tests/SimpleJsonTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public class SimpleJsonTests
private CyclicObject _cyclicGenericDictionary;
private CyclicObject _deepCyclicObject;
private CyclicObject _siblingObject;
#if DEBUG
private string token = "null";
#else
private string token = "d595e487e4f9f950";
#endif

[SetUp]
public void SetUp()
Expand Down Expand Up @@ -90,15 +95,15 @@ public void NullInDictionaryDoesNotSerialize()
public void SerializeTypeObject()
{
string json = SimpleJson.SerializeObject(typeof(FakeRaygunClient));
Assert.AreEqual("\"Mindscape.Raygun4Net.NetCore.Tests.FakeRaygunClient, Mindscape.Raygun4Net.NetCore.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\"", json);
Assert.AreEqual(@$"""Mindscape.Raygun4Net.NetCore.Tests.FakeRaygunClient, Mindscape.Raygun4Net.NetCore.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken={token}""", json);
}
[Test]
public void SerializeTypeProperty()
{
var o = new { Type = typeof(FakeRaygunClient) };
string json = SimpleJson.SerializeObject(o);
Assert.AreEqual("{\"Type\":\"Mindscape.Raygun4Net.NetCore.Tests.FakeRaygunClient, Mindscape.Raygun4Net.NetCore.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\"}", json);
Assert.AreEqual(@$"{{""Type"":""Mindscape.Raygun4Net.NetCore.Tests.FakeRaygunClient, Mindscape.Raygun4Net.NetCore.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken={token}""}}", json);
}

// Cyclic object structure tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Mindscape.Raygun4Net4.Integration.Tests
{
public class TestIfWeCanSendToRaygun
{
private string ApiKey = "";//"PUT_YOUR_KEY_HERE"
private string ApiKey = "0DuXAzfTpTxCJf3PiZqJzA";//"PUT_YOUR_KEY_HERE"
private const string InvalidApiKey = "BADKEY";
private TraceChecker TraceChecker { get; } = new();

Expand Down

0 comments on commit d307150

Please sign in to comment.