Skip to content

Commit

Permalink
Updated path on test
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Anderson committed Dec 4, 2024
1 parent d9c114f commit 8d1e544
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 7 additions & 2 deletions Btms.Backend.IntegrationTests/SensitiveDataTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Text.Json.Nodes;
using Btms.Backend.IntegrationTests.Helpers;
using Btms.BlobService;
using Btms.SensitiveData;
using Btms.Types.Ipaffs;
using FluentAssertions;
Expand All @@ -8,13 +10,15 @@

namespace Btms.Backend.IntegrationTests;


public class SensitiveDataTests
{
[Fact]
public void WhenIncludeSensitiveData_RedactedShouldBeSameAsJson()
{
var filePath = "../../../Fixtures/SmokeTest/IPAFFS/CHEDA/CHEDA_GB_2024_1041389-ee0e6fcf-52a4-45ea-8830-d4553ee70361.json";
string json =
File.ReadAllText(Path.GetFullPath("..\\..\\..\\Fixtures\\SmokeTest\\IPAFFS\\CHEDA\\CHEDA_GB_2024_1041389-ee0e6fcf-52a4-45ea-8830-d4553ee70361.json"));
File.ReadAllText(filePath);

SensitiveDataOptions options = new SensitiveDataOptions { Getter = s => "TestRedacted", Include = true };
var serializer = new SensitiveDataSerializer(Options.Create(options), NullLogger<SensitiveDataSerializer>.Instance);
Expand All @@ -28,8 +32,9 @@ public void WhenIncludeSensitiveData_RedactedShouldBeSameAsJson()
[Fact]
public void WhenIncludeSensitiveData_RedactedShouldBeDifferentJson()
{
var filePath = "../../../Fixtures/SmokeTest/IPAFFS/CHEDA/CHEDA_GB_2024_1041389-ee0e6fcf-52a4-45ea-8830-d4553ee70361.json";
string json =
File.ReadAllText(Path.GetFullPath("..\\..\\..\\Fixtures\\SmokeTest\\IPAFFS\\CHEDA\\CHEDA_GB_2024_1041389-ee0e6fcf-52a4-45ea-8830-d4553ee70361.json"));
File.ReadAllText(filePath);

SensitiveDataOptions options = new SensitiveDataOptions { Getter = s => "TestRedacted", Include = false };
var serializer = new SensitiveDataSerializer(Options.Create(options), NullLogger<SensitiveDataSerializer>.Instance);
Expand Down
6 changes: 0 additions & 6 deletions Btms.SensitiveData/Btms.SensitiveData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Flattener\**" />
<EmbeddedResource Remove="Flattener\**" />
<None Remove="Flattener\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="JsonPatch.Net" Version="3.2.2" />
<PackageReference Include="JsonPath.Net" Version="2.0.0" />
Expand Down

0 comments on commit 8d1e544

Please sign in to comment.