From 7ff6782e48da1eb92ec5e36fdaf17a26c7759694 Mon Sep 17 00:00:00 2001 From: Ivar Nesje Date: Tue, 8 Oct 2024 13:22:27 +0200 Subject: [PATCH] Fix formatting and move the .gitignore file protecting test data --- .../Internal/Data/CachedInstanceDataAccessor.cs | 4 +++- .../Internal/Expressions/LayoutEvaluatorStateInitializer.cs | 4 +++- .../Instances/tdd/{contributer-restriction => }/.gitignore | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) rename test/Altinn.App.Api.Tests/Data/Instances/tdd/{contributer-restriction => }/.gitignore (64%) diff --git a/src/Altinn.App.Core/Internal/Data/CachedInstanceDataAccessor.cs b/src/Altinn.App.Core/Internal/Data/CachedInstanceDataAccessor.cs index 102af55a1..19e74c93d 100644 --- a/src/Altinn.App.Core/Internal/Data/CachedInstanceDataAccessor.cs +++ b/src/Altinn.App.Core/Internal/Data/CachedInstanceDataAccessor.cs @@ -123,7 +123,9 @@ public DataType GetDataType(DataElementIdentifier dataElementIdentifier) var dataType = appMetadata.DataTypes.Find(d => d.Id == dataElement.DataType); if (dataType is null) { - throw new InvalidOperationException($"Data type {dataElement.DataType} not found in applicationmetadata.json"); + throw new InvalidOperationException( + $"Data type {dataElement.DataType} not found in applicationmetadata.json" + ); } return dataType; diff --git a/src/Altinn.App.Core/Internal/Expressions/LayoutEvaluatorStateInitializer.cs b/src/Altinn.App.Core/Internal/Expressions/LayoutEvaluatorStateInitializer.cs index 7dfa944fb..796d4aefb 100644 --- a/src/Altinn.App.Core/Internal/Expressions/LayoutEvaluatorStateInitializer.cs +++ b/src/Altinn.App.Core/Internal/Expressions/LayoutEvaluatorStateInitializer.cs @@ -91,7 +91,9 @@ public DataType GetDataType(DataElementIdentifier dataElementIdentifier) var dataType = _applicationMetadata.DataTypes.Find(d => d.Id == dataElement.DataType); if (dataType is null) { - throw new InvalidOperationException($"Data type {dataElement.DataType} not found in applicationmetadata.json"); + throw new InvalidOperationException( + $"Data type {dataElement.DataType} not found in applicationmetadata.json" + ); } return dataType; diff --git a/test/Altinn.App.Api.Tests/Data/Instances/tdd/contributer-restriction/.gitignore b/test/Altinn.App.Api.Tests/Data/Instances/tdd/.gitignore similarity index 64% rename from test/Altinn.App.Api.Tests/Data/Instances/tdd/contributer-restriction/.gitignore rename to test/Altinn.App.Api.Tests/Data/Instances/tdd/.gitignore index dcf6ac329..8c777c01b 100644 --- a/test/Altinn.App.Api.Tests/Data/Instances/tdd/contributer-restriction/.gitignore +++ b/test/Altinn.App.Api.Tests/Data/Instances/tdd/.gitignore @@ -1,4 +1,4 @@ # Ignore guid.json files ????????-????-????-????-????????????.json # ignore copied blobs -*/*/blob/????????-????-????-????-???????????? \ No newline at end of file +*/*/*/blob/????????-????-????-????-????????????