├── test ├── Altinn.App.Api.Tests │ ├── Data │ │ ├── apps │ │ │ ├── tdd │ │ │ │ ├── contributer-restriction │ │ │ │ │ ├── _testdata_ │ │ │ │ │ │ ├── zero.pdf │ │ │ │ │ │ ├── example.pdf │ │ │ │ │ │ └── example.jpg.pdf │ │ │ │ │ └── ui │ │ │ │ │ │ ├── default │ │ │ │ │ │ └── Settings.json │ │ │ │ │ │ └── layout-sets.json │ │ │ │ ├── eformidling-app │ │ │ │ │ └── config │ │ │ │ │ │ └── texts │ │ │ │ │ │ └── resource.nb.json │ │ │ │ └── permissive-app │ │ │ │ │ └── ui │ │ │ │ │ ├── default │ │ │ │ │ └── Settings.json │ │ │ │ │ └── layout-sets.json │ │ │ └── ttd │ │ │ │ └── service-tasks │ │ │ │ └── ui │ │ │ │ ├── form │ │ │ │ └── Settings.json │ │ │ │ ├── layout-sets.json │ │ │ │ └── footer.json │ │ ├── Instances │ │ │ ├── tdd │ │ │ │ └── contributer-restriction │ │ │ │ │ └── 500600 │ │ │ │ │ ├── 0fc98a23-fe31-4ef5-8fb9-dd3f479354ce │ │ │ │ │ └── blob │ │ │ │ │ │ ├── fc121812-0336-45fb-a75c-490df3ad510a.pretest │ │ │ │ │ │ └── fc121812-0336-45fb-a75c-490df3ad5109.pretest │ │ │ │ │ ├── 09e16a2d-e009-4f3a-940b-da1ea54a18b4 │ │ │ │ │ └── blob │ │ │ │ │ │ └── c52f40dd-11d1-4e24-b13b-4fcfdf6ca1c6.pretest │ │ │ │ │ ├── cff1cb24-5bc1-4888-8e06-c634753c5144 │ │ │ │ │ └── blob │ │ │ │ │ │ └── f3e04c65-aa70-40ec-84df-087cc2583402.pretest │ │ │ │ │ └── fad57e80-ec2f-4dee-90ac-400fa6d7720f │ │ │ │ │ └── blob │ │ │ │ │ └── 3b46b9ef-774c-4849-b4dd-66ef871f5b07.pretest │ │ │ ├── .gitignore │ │ │ └── ttd │ │ │ │ └── service-tasks │ │ │ │ ├── 501337 │ │ │ │ └── a2af1cfd-db99-45f9-9625-9dfa1223485f │ │ │ │ │ └── blob │ │ │ │ │ └── fd4c42a4-a6a0-4aec-b8e9-9f5d34c445ca.pretest │ │ │ │ └── .gitignore │ │ └── authorization │ │ │ ├── claims │ │ │ ├── 12345.json │ │ │ └── 1337.json │ │ │ ├── resources │ │ │ └── nav_tiltakAvtaleOmArbeidstrening.json │ │ │ ├── roles │ │ │ ├── User_1002 │ │ │ │ ├── party_500000 │ │ │ │ │ └── roles.json │ │ │ │ └── party_510002 │ │ │ │ │ └── roles.json │ │ │ ├── User_1001 │ │ │ │ ├── party_510001 │ │ │ │ │ └── roles.json │ │ │ │ └── party_500000 │ │ │ │ │ └── roles.json │ │ │ ├── User_12345 │ │ │ │ └── party_512345 │ │ │ │ │ └── roles.json │ │ │ ├── User_1003 │ │ │ │ └── party_510003 │ │ │ │ │ └── roles.json │ │ │ └── User_1337 │ │ │ │ ├── party_500700 │ │ │ │ └── roles.json │ │ │ │ ├── party_500800 │ │ │ │ └── roles.json │ │ │ │ ├── party_500801 │ │ │ │ └── roles.json │ │ │ │ └── party_500802 │ │ │ │ └── roles.json │ │ │ └── partylist │ │ │ └── 12345.json │ └── Mocks │ │ ├── SignClientMock.cs │ │ └── Event │ │ └── EventSecretCodeProviderStub.cs ├── Altinn.App.Core.Tests │ ├── secrets.json │ ├── Implementation │ │ ├── TestData │ │ │ ├── AppMetadata │ │ │ │ └── invalid.applicationmetadata.json │ │ │ ├── AppPolicy │ │ │ │ └── policy.xml │ │ │ └── AppProcess │ │ │ │ └── process.bpmn │ │ └── EventsClientTest.AddEvent_RegisterEventWithInstanceOwnerOrganisation_CloudEventInRequestContainOrganisationNumber.verified.txt │ ├── Internal │ │ ├── App │ │ │ ├── TestData │ │ │ │ ├── AppMetadata │ │ │ │ │ └── invalid.applicationmetadata.json │ │ │ │ ├── AppPolicy │ │ │ │ │ └── policy.xml │ │ │ │ └── AppProcess │ │ │ │ │ └── process.bpmn │ │ │ └── AppMetadataTest.GetApplicationMetadata_desrializes_file_from_disk.verified.txt │ │ ├── Pdf │ │ │ └── TestData │ │ │ │ └── example.pdf │ │ ├── Process │ │ │ ├── ServiceTasks │ │ │ │ └── Legacy │ │ │ │ │ └── TestData │ │ │ │ │ └── DummyDataType.cs │ │ │ └── TestData │ │ │ │ └── DummyModel.cs │ │ └── Auth │ │ │ └── AuthorizationServiceTests.GetPartyList_returns_party_list_from_AuthorizationClient.verified.txt │ ├── LayoutExpressions │ │ ├── CommonTests │ │ │ ├── .editorconfig │ │ │ └── shared-tests │ │ │ │ ├── functions │ │ │ │ ├── and │ │ │ │ │ ├── allows-1.json │ │ │ │ │ ├── all-true.json │ │ │ │ │ ├── allows-0.json │ │ │ │ │ ├── casts-to-boolean.json │ │ │ │ │ ├── null-is-false.json │ │ │ │ │ ├── casts-to-boolean2.json │ │ │ │ │ ├── last-false.json │ │ │ │ │ ├── allows-stringy-false.json │ │ │ │ │ ├── allows-stringy-true.json │ │ │ │ │ ├── allows-stringy-1.json │ │ │ │ │ ├── single-input-false.json │ │ │ │ │ ├── single-input-true.json │ │ │ │ │ ├── allows-stringy-0.json │ │ │ │ │ ├── disallows-2.json │ │ │ │ │ ├── empty-and.json │ │ │ │ │ ├── disallows-empty-strings.json │ │ │ │ │ └── disallows-other-strings.json │ │ │ │ ├── or │ │ │ │ │ ├── allows-0.json │ │ │ │ │ ├── null-is-false.json │ │ │ │ │ ├── allows-1.json │ │ │ │ │ ├── all-true.json │ │ │ │ │ ├── last-false.json │ │ │ │ │ ├── allows-stringy-true.json │ │ │ │ │ ├── allows-stringy-false.json │ │ │ │ │ ├── single-input-true.json │ │ │ │ │ ├── single-input-false.json │ │ │ │ │ ├── disallows-2.json │ │ │ │ │ ├── empty-or.json │ │ │ │ │ ├── disallows-empty-strings.json │ │ │ │ │ └── disallows-other-strings.json │ │ │ │ ├── not │ │ │ │ │ ├── not-inverts-false.json │ │ │ │ │ ├── not-inverts-true.json │ │ │ │ │ ├── not-changes-null-to-true.json │ │ │ │ │ ├── not-handles-numeric-zero-as-false.json │ │ │ │ │ ├── not-errors-on-zero-arguments.json │ │ │ │ │ ├── not-errors-on-two-arguments.json │ │ │ │ │ ├── not-errors-on-numbers-not-0-or-1.json │ │ │ │ │ └── not-changes-notNull-to-false.json │ │ │ │ ├── concat │ │ │ │ │ ├── empty-string.json │ │ │ │ │ ├── one-string.json │ │ │ │ │ ├── casts-numbers.json │ │ │ │ │ ├── nulls-are-empty-strings.json │ │ │ │ │ └── boolean-are-empty-strings.json │ │ │ │ ├── if │ │ │ │ │ ├── simple.json │ │ │ │ │ ├── falsy-0-2.json │ │ │ │ │ ├── null-otherwise.json │ │ │ │ │ ├── truthy-1-2.json │ │ │ │ │ ├── falsy-0-1.json │ │ │ │ │ ├── truthy-1-1.json │ │ │ │ │ ├── else-otherwise.json │ │ │ │ │ ├── else-otherwise2.json │ │ │ │ │ ├── fail-5.json │ │ │ │ │ ├── fail-empty-string.json │ │ │ │ │ ├── fail-without-else.json │ │ │ │ │ ├── fail-string.json │ │ │ │ │ ├── fail-without-else2.json │ │ │ │ │ ├── never-3-arguments.json │ │ │ │ │ ├── never-5-arguments.json │ │ │ │ │ └── fail-else-as-expr.json │ │ │ │ ├── round │ │ │ │ │ ├── round-null.json │ │ │ │ │ ├── round-null2.json │ │ │ │ │ ├── nearest-integer.json │ │ │ │ │ ├── round-negative-number.json │ │ │ │ │ ├── round-0-decimal-places.json │ │ │ │ │ ├── round-0-decimal-places2.json │ │ │ │ │ ├── round-strings.json │ │ │ │ │ ├── round-without-decimalCount.json │ │ │ │ │ ├── round-without-decimalCount2.json │ │ │ │ │ ├── nearest-integer-with-decimal.json │ │ │ │ │ ├── round-with-too-many-args.json │ │ │ │ │ └── nearest-integer-with-decimal-as-strings.json │ │ │ │ ├── text │ │ │ │ │ ├── null.json │ │ │ │ │ ├── should-return-key-name-if-key-not-exist.json │ │ │ │ │ └── should-return-text-resource.json │ │ │ │ ├── equals │ │ │ │ │ ├── same-types-null.json │ │ │ │ │ ├── same-types-int-true.json │ │ │ │ │ ├── same-types-float-true.json │ │ │ │ │ ├── same-types-int-false.json │ │ │ │ │ ├── same-types-bool-true.json │ │ │ │ │ ├── same-types-float-false.json │ │ │ │ │ ├── same-types-float-false2.json │ │ │ │ │ ├── same-types-string-true.json │ │ │ │ │ ├── null-case-insensitive.json │ │ │ │ │ ├── same-types-bool-false.json │ │ │ │ │ ├── same-types-string-false.json │ │ │ │ │ ├── same-types-string-true2.json │ │ │ │ │ ├── diff-types-float-int-true.json │ │ │ │ │ ├── diff-types-float-null-false.json │ │ │ │ │ ├── diff-types-int-null-false.json │ │ │ │ │ ├── diff-types-bool-float-false.json │ │ │ │ │ ├── diff-types-bool-int-false.json │ │ │ │ │ ├── diff-types-bool-null-false.json │ │ │ │ │ ├── diff-types-float-int-false2.json │ │ │ │ │ ├── diff-types-string-int-true.json │ │ │ │ │ ├── diff-types-string-null-false.json │ │ │ │ │ ├── diff-types-string-null-true.json │ │ │ │ │ ├── false-case-insensitive.json │ │ │ │ │ ├── false-case-insensitive2.json │ │ │ │ │ ├── diff-types-float-int-false.json │ │ │ │ │ ├── diff-types-string-bool-true.json │ │ │ │ │ ├── diff-types-string-float-false.json │ │ │ │ │ ├── diff-types-string-float-true.json │ │ │ │ │ ├── diff-types-string-int-false.json │ │ │ │ │ ├── diff-types-string-bool-false.json │ │ │ │ │ ├── too-few-args.json │ │ │ │ │ ├── strings-case-sensitive.json │ │ │ │ │ └── too-many-args.json │ │ │ │ ├── formatDate │ │ │ │ │ ├── error-parseNumber.json │ │ │ │ │ ├── error-parseTrue.json │ │ │ │ │ ├── parseNull-returnsNull.json │ │ │ │ │ ├── error-parseFalse.json │ │ │ │ │ ├── formats-time-in-format-specified.json │ │ │ │ │ ├── formats-date-in-format-specified.json │ │ │ │ │ ├── formats-date-in-format-specified2.json │ │ │ │ │ ├── valid-lowercase-d.json │ │ │ │ │ ├── valid-lowercase-h.json │ │ │ │ │ ├── valid-lowercase-m.json │ │ │ │ │ ├── valid-lowercase-s.json │ │ │ │ │ ├── valid-uppercase-h.json │ │ │ │ │ ├── valid-uppercase-m.json │ │ │ │ │ ├── valid-uppercase-s.json │ │ │ │ │ ├── valid-lowercase-dd.json │ │ │ │ │ ├── valid-lowercase-hh.json │ │ │ │ │ ├── valid-lowercase-mm.json │ │ │ │ │ ├── valid-lowercase-ss.json │ │ │ │ │ ├── valid-lowercase-u.json │ │ │ │ │ ├── valid-lowercase-y.json │ │ │ │ │ ├── valid-lowercase-yy.json │ │ │ │ │ ├── valid-uppercase-hh.json │ │ │ │ │ ├── valid-uppercase-mm.json │ │ │ │ │ ├── valid-uppercase-ss.json │ │ │ │ │ ├── formats-date.json │ │ │ │ │ ├── valid-lowercase-uu.json │ │ │ │ │ ├── valid-lowercase-uuu.json │ │ │ │ │ ├── valid-lowercase-yyy.json │ │ │ │ │ ├── valid-uppercase-sss.json │ │ │ │ │ ├── valid-lowercase-uuuu.json │ │ │ │ │ ├── valid-lowercase-yyyy.json │ │ │ │ │ ├── formats-date-english.json │ │ │ │ │ ├── formats-date-english2.json │ │ │ │ │ ├── formats-date-time.json │ │ │ │ │ ├── formats-date-with-offset.json │ │ │ │ │ ├── valid-uppercase-e-en.json │ │ │ │ │ ├── valid-uppercase-e-nn.json │ │ │ │ │ ├── valid-uppercase-g-en.json │ │ │ │ │ ├── valid-uppercase-gg-en.json │ │ │ │ │ ├── valid-uppercase-e-nb.json │ │ │ │ │ ├── valid-uppercase-ee-en.json │ │ │ │ │ ├── valid-uppercase-ee-nn.json │ │ │ │ │ ├── valid-uppercase-eee-en.json │ │ │ │ │ ├── valid-uppercase-eee-nn.json │ │ │ │ │ ├── valid-uppercase-g-nn.json │ │ │ │ │ ├── valid-uppercase-gg-nn.json │ │ │ │ │ ├── valid-uppercase-ggg-en.json │ │ │ │ │ ├── valid-uppercase-mmm-en.json │ │ │ │ │ ├── valid-uppercase-mmm-nn.json │ │ │ │ │ ├── valid-uppercase-ee-nb.json │ │ │ │ │ ├── valid-uppercase-eee-nb.json │ │ │ │ │ ├── valid-uppercase-eeeee-en.json │ │ │ │ │ ├── valid-uppercase-eeeee-nn.json │ │ │ │ │ ├── valid-uppercase-g-nb.json │ │ │ │ │ ├── valid-uppercase-ggg-nn.json │ │ │ │ │ ├── valid-uppercase-ggggg-en.json │ │ │ │ │ ├── valid-uppercase-mmm-nb.json │ │ │ │ │ ├── valid-uppercase-mmmm-nn.json │ │ │ │ │ ├── valid-uppercase-eeee-nn.json │ │ │ │ │ ├── valid-uppercase-eeeee-nb.json │ │ │ │ │ ├── valid-uppercase-gg-nb.json │ │ │ │ │ ├── valid-uppercase-ggg-nb.json │ │ │ │ │ ├── valid-uppercase-ggggg-nn.json │ │ │ │ │ ├── valid-uppercase-mmmm-en.json │ │ │ │ │ ├── valid-uppercase-mmmm-nb.json │ │ │ │ │ ├── valid-uppercase-eeee-en.json │ │ │ │ │ └── valid-uppercase-eeee-nb.json │ │ │ │ ├── lessThan │ │ │ │ │ ├── same-types-null.json │ │ │ │ │ ├── same-types-int-true.json │ │ │ │ │ ├── same-types-int-false.json │ │ │ │ │ ├── same-types-string-false.json │ │ │ │ │ ├── diff-types-int-null-false3.json │ │ │ │ │ ├── same-types-float-false.json │ │ │ │ │ ├── same-types-float-true.json │ │ │ │ │ ├── same-types-string-true.json │ │ │ │ │ ├── diff-types-int-null-false.json │ │ │ │ │ ├── diff-types-int-null-false2.json │ │ │ │ │ ├── diff-types-string-int-true.json │ │ │ │ │ ├── diff-types-string-null.json │ │ │ │ │ ├── diff-types-float-int-false.json │ │ │ │ │ ├── diff-types-float-int-true.json │ │ │ │ │ ├── diff-types-float-null-false.json │ │ │ │ │ ├── diff-types-string-float-true.json │ │ │ │ │ ├── diff-types-string-int-false.json │ │ │ │ │ ├── diff-types-float-null-false2.json │ │ │ │ │ ├── diff-types-string-float-false.json │ │ │ │ │ ├── same-types-bool.json │ │ │ │ │ ├── diff-types-bool-int.json │ │ │ │ │ ├── diff-types-bool-null.json │ │ │ │ │ ├── diff-types-string-bool.json │ │ │ │ │ ├── diff-types-bool-float.json │ │ │ │ │ └── diff-types-string-null2.json │ │ │ │ ├── notEquals │ │ │ │ │ ├── same-types-null.json │ │ │ │ │ ├── same-types-int-false.json │ │ │ │ │ ├── same-types-int-true.json │ │ │ │ │ ├── same-types-bool-true.json │ │ │ │ │ ├── same-types-float-true.json │ │ │ │ │ ├── same-types-bool-false.json │ │ │ │ │ ├── same-types-float-false.json │ │ │ │ │ ├── same-types-string-false.json │ │ │ │ │ ├── same-types-string-true.json │ │ │ │ │ ├── diff-types-bool-int-true.json │ │ │ │ │ ├── diff-types-bool-null-true.json │ │ │ │ │ ├── diff-types-float-null-true.json │ │ │ │ │ ├── diff-types-int-null-true.json │ │ │ │ │ ├── diff-types-bool-float-true.json │ │ │ │ │ ├── diff-types-float-int-false.json │ │ │ │ │ ├── diff-types-float-int-true.json │ │ │ │ │ ├── diff-types-string-bool-true.json │ │ │ │ │ ├── diff-types-string-int-false.json │ │ │ │ │ ├── diff-types-string-null-true.json │ │ │ │ │ ├── diff-types-string-int-true.json │ │ │ │ │ ├── diff-types-string-null-false.json │ │ │ │ │ ├── diff-types-string-bool-false.json │ │ │ │ │ ├── diff-types-string-float-false.json │ │ │ │ │ └── diff-types-string-float-true.json │ │ │ │ ├── contains │ │ │ │ │ ├── null4.json │ │ │ │ │ ├── empty-string.json │ │ │ │ │ ├── case-sensitivity.json │ │ │ │ │ ├── null.json │ │ │ │ │ ├── null3.json │ │ │ │ │ ├── null2.json │ │ │ │ │ ├── partial-match.json │ │ │ │ │ ├── exact-match.json │ │ │ │ │ └── not-match.json │ │ │ │ ├── endsWith │ │ │ │ │ ├── ends-with-null.json │ │ │ │ │ ├── empty-string.json │ │ │ │ │ ├── ends-with.json │ │ │ │ │ ├── number-ends-with-number.json │ │ │ │ │ ├── not-ends-with.json │ │ │ │ │ ├── exact-match.json │ │ │ │ │ ├── ends-with-number.json │ │ │ │ │ └── case-sensitivity.json │ │ │ │ ├── greaterThan │ │ │ │ │ ├── same-types-null.json │ │ │ │ │ ├── same-types-int-true.json │ │ │ │ │ ├── negative-string.json │ │ │ │ │ ├── same-types-int-false.json │ │ │ │ │ ├── diff-types-int-null-false3.json │ │ │ │ │ ├── negative-string2.json │ │ │ │ │ ├── same-types-float-false.json │ │ │ │ │ ├── same-types-float-true.json │ │ │ │ │ ├── same-types-string-false.json │ │ │ │ │ ├── same-types-string-true.json │ │ │ │ │ ├── diff-types-int-null-false.json │ │ │ │ │ ├── diff-types-string-int-true.json │ │ │ │ │ ├── diff-types-string-null.json │ │ │ │ │ ├── negative-string-float.json │ │ │ │ │ ├── negative-string-float2.json │ │ │ │ │ ├── diff-types-float-int-false.json │ │ │ │ │ ├── diff-types-float-int-true.json │ │ │ │ │ ├── diff-types-float-null-false.json │ │ │ │ │ ├── diff-types-int-null-false2.json │ │ │ │ │ ├── diff-types-string-int-false.json │ │ │ │ │ ├── diff-types-float-null-false2.json │ │ │ │ │ ├── diff-types-string-float-false.json │ │ │ │ │ ├── diff-types-string-float-true.json │ │ │ │ │ ├── same-types-bool.json │ │ │ │ │ ├── diff-types-bool-int.json │ │ │ │ │ ├── diff-types-bool-null.json │ │ │ │ │ ├── diff-types-bool-float.json │ │ │ │ │ ├── diff-types-string-bool.json │ │ │ │ │ ├── diff-types-string-null2.json │ │ │ │ │ ├── no-decimals-fail.json │ │ │ │ │ ├── doble-dots-fail.json │ │ │ │ │ ├── no-decimals-fail-negative.json │ │ │ │ │ └── doble-dots-fail-negative.json │ │ │ │ ├── lessThanEq │ │ │ │ │ ├── same-types-null.json │ │ │ │ │ ├── same-types-int-false.json │ │ │ │ │ ├── same-types-int-true.json │ │ │ │ │ ├── same-types-float-true.json │ │ │ │ │ ├── same-types-string-false.json │ │ │ │ │ ├── diff-types-int-null-false3.json │ │ │ │ │ ├── diff-types-string-null.json │ │ │ │ │ ├── same-types-float-false.json │ │ │ │ │ ├── same-types-string-true.json │ │ │ │ │ ├── diff-types-float-int-true.json │ │ │ │ │ ├── diff-types-int-null-false.json │ │ │ │ │ ├── diff-types-int-null-false2.json │ │ │ │ │ ├── diff-types-string-int-true.json │ │ │ │ │ ├── diff-types-float-int-false.json │ │ │ │ │ ├── diff-types-float-null-false.json │ │ │ │ │ ├── diff-types-float-null-false2.json │ │ │ │ │ ├── diff-types-string-int-false.json │ │ │ │ │ ├── diff-types-string-float-false.json │ │ │ │ │ ├── diff-types-string-float-true.json │ │ │ │ │ ├── same-types-bool.json │ │ │ │ │ ├── diff-types-bool-int.json │ │ │ │ │ ├── diff-types-bool-null.json │ │ │ │ │ ├── diff-types-string-bool.json │ │ │ │ │ ├── diff-types-bool-float.json │ │ │ │ │ └── diff-types-string-null2.json │ │ │ │ ├── lowerCase │ │ │ │ │ ├── null.json │ │ │ │ │ ├── should-lowercase-string.json │ │ │ │ │ ├── should-lowercase-whole-word.json │ │ │ │ │ ├── lowercase-number-should-return-string.json │ │ │ │ │ └── should-lowercase-whole-string.json │ │ │ │ ├── stringLength │ │ │ │ │ ├── null.json │ │ │ │ │ ├── string-length.json │ │ │ │ │ ├── empty-string.json │ │ │ │ │ ├── length-of-unicode.json │ │ │ │ │ ├── length-of-number.json │ │ │ │ │ ├── whitespace-length.json │ │ │ │ │ └── length-equals.json │ │ │ │ ├── stringSlice │ │ │ │ │ ├── simple.json │ │ │ │ │ ├── end-too-large.json │ │ │ │ │ ├── start-too-large.json │ │ │ │ │ ├── negative-start.json │ │ │ │ │ ├── negative-end.json │ │ │ │ │ ├── end-before-start.json │ │ │ │ │ └── start-before-length.json │ │ │ │ ├── upperCase │ │ │ │ │ ├── null.json │ │ │ │ │ ├── should-uppercase-string.json │ │ │ │ │ ├── should-uppercase-whole-word.json │ │ │ │ │ ├── uppercase-number-should-return-string.json │ │ │ │ │ └── should-uppercase-whole-string.json │ │ │ │ ├── greaterThanEq │ │ │ │ │ ├── same-types-null.json │ │ │ │ │ ├── same-types-int-true.json │ │ │ │ │ ├── same-types-int-false.json │ │ │ │ │ ├── same-types-string-false.json │ │ │ │ │ ├── same-types-string-true.json │ │ │ │ │ ├── diff-types-int-null-false3.json │ │ │ │ │ ├── same-types-float-false.json │ │ │ │ │ ├── same-types-float-true.json │ │ │ │ │ ├── diff-types-float-int-true.json │ │ │ │ │ ├── diff-types-int-null-false.json │ │ │ │ │ ├── diff-types-int-null-false2.json │ │ │ │ │ ├── diff-types-string-int-true.json │ │ │ │ │ ├── diff-types-string-null.json │ │ │ │ │ ├── diff-types-float-int-false.json │ │ │ │ │ ├── diff-types-float-null-false.json │ │ │ │ │ ├── diff-types-string-int-false.json │ │ │ │ │ ├── diff-types-float-null-false2.json │ │ │ │ │ ├── diff-types-string-float-false.json │ │ │ │ │ ├── diff-types-string-float-true.json │ │ │ │ │ ├── same-types-bool.json │ │ │ │ │ ├── diff-types-bool-int.json │ │ │ │ │ ├── diff-types-bool-null.json │ │ │ │ │ ├── diff-types-string-bool.json │ │ │ │ │ ├── diff-types-bool-float.json │ │ │ │ │ └── diff-types-string-null2.json │ │ │ │ ├── lowerCaseFirst │ │ │ │ │ ├── number.json │ │ │ │ │ ├── simple1.json │ │ │ │ │ └── simple2.json │ │ │ │ ├── notContains │ │ │ │ │ ├── null4.json │ │ │ │ │ ├── null.json │ │ │ │ │ ├── case-sensitivity.json │ │ │ │ │ ├── null2.json │ │ │ │ │ ├── null3.json │ │ │ │ │ ├── exact-match.json │ │ │ │ │ └── not-match.json │ │ │ │ ├── startsWith │ │ │ │ │ ├── null.json │ │ │ │ │ ├── null2.json │ │ │ │ │ ├── empty-string.json │ │ │ │ │ ├── start-with.json │ │ │ │ │ ├── number-starts-with-number.json │ │ │ │ │ ├── not-starts-with.json │ │ │ │ │ ├── exact-match.json │ │ │ │ │ ├── number-starts-with-string.json │ │ │ │ │ ├── case-sensitivity.json │ │ │ │ │ └── start-with-number.json │ │ │ │ ├── stringIndexOf │ │ │ │ │ ├── whitespace.json │ │ │ │ │ ├── number.json │ │ │ │ │ ├── look-in-null.json │ │ │ │ │ ├── not-found.json │ │ │ │ │ ├── simple.json │ │ │ │ │ ├── look-for-null.json │ │ │ │ │ └── emoji.json │ │ │ │ ├── upperCaseFirst │ │ │ │ │ ├── number.json │ │ │ │ │ ├── simple1.json │ │ │ │ │ └── simple2.json │ │ │ │ ├── argv │ │ │ │ │ ├── simple-0.json │ │ │ │ │ ├── simple-1.json │ │ │ │ │ ├── arg-can-be-null.json │ │ │ │ │ ├── error-no-args.json │ │ │ │ │ └── error-no-such-arg.json │ │ │ │ ├── commaContains │ │ │ │ │ ├── null.json │ │ │ │ │ ├── null2.json │ │ │ │ │ ├── empty-string.json │ │ │ │ │ ├── should-include-word-in-string.json │ │ │ │ │ ├── string-list-include-number.json │ │ │ │ │ └── should-not-include-word-in-string.json │ │ │ │ ├── language │ │ │ │ │ ├── should-return-nb-if-not-set.json │ │ │ │ │ └── should-return-profile-settings-preference.json │ │ │ │ ├── compare-equals │ │ │ │ │ ├── equals-strings.json │ │ │ │ │ ├── not-equals-strings.json │ │ │ │ │ └── error-too-few-args.json │ │ │ │ ├── compare-greaterThan │ │ │ │ │ ├── greaterThan-simple.json │ │ │ │ │ └── greaterThan-simple2.json │ │ │ │ ├── compare-isSameDay │ │ │ │ │ ├── errors-with-number.json │ │ │ │ │ ├── not-sameDay-year.json │ │ │ │ │ └── errors-with-only-year.json │ │ │ │ ├── compare-isBefore │ │ │ │ │ ├── date-simple.json │ │ │ │ │ ├── date-empty-string.json │ │ │ │ │ ├── date-empty-string-and-null.json │ │ │ │ │ ├── error-date-invalid.json │ │ │ │ │ └── error-date-invalid2.json │ │ │ │ ├── stringReplace │ │ │ │ │ ├── multiple.json │ │ │ │ │ ├── emoji.json │ │ │ │ │ ├── simple.json │ │ │ │ │ ├── replace-with-null.json │ │ │ │ │ └── special-chars.json │ │ │ │ ├── compare-isAfter │ │ │ │ │ ├── date-with-time.json │ │ │ │ │ └── date-leap-year.json │ │ │ │ ├── unknown │ │ │ │ │ ├── function-wrong-case.json │ │ │ │ │ ├── appSettings.json │ │ │ │ │ └── invalid-function.json │ │ │ │ ├── compare-isAfterEq │ │ │ │ │ └── isAfterEq.json │ │ │ │ ├── compare-error │ │ │ │ │ ├── notEquals-not-implemented.json │ │ │ │ │ ├── error-wrong-operator.json │ │ │ │ │ ├── error-not-not.json │ │ │ │ │ ├── error-expr-as-operator.json │ │ │ │ │ ├── error-case-sensitive-not.json │ │ │ │ │ └── error-expr-as-not.json │ │ │ │ ├── compare-isBeforeEq │ │ │ │ │ └── isBeforeEq.json │ │ │ │ ├── frontendSettings │ │ │ │ │ ├── lookup-case-sensitive.json │ │ │ │ │ ├── simple-lookup.json │ │ │ │ │ └── null.json │ │ │ │ └── dataModelMultiple │ │ │ │ │ └── dataModel-type-as-expr.json │ │ │ │ └── invalid │ │ │ │ ├── empty-array.json │ │ │ │ ├── missing-args.json │ │ │ │ ├── extra-argument.json │ │ │ │ ├── numeric-array.json │ │ │ │ ├── empty-array-inside.json │ │ │ │ ├── empty-object.json │ │ │ │ ├── func-not-implemented.json │ │ │ │ └── wrong-function-capitalization.json │ │ └── FullTests │ │ │ ├── RequiredValidator │ │ │ └── RequiredValidatorTests.VerifyAllOk.verified.txt │ │ │ ├── Test2 │ │ │ └── SecondPage.json │ │ │ └── Test3 │ │ │ └── SecondPage.json │ ├── Features │ │ └── Validators │ │ │ └── expression-validation-tests │ │ │ └── .editorconfig │ └── Infrastructure │ │ └── Clients │ │ ├── AccessManagement │ │ ├── AccessManagementClientTests.DelegateRights_VerifyHttpCall.verified.txt │ │ └── AccessManagementClientTests.RevokeRights_VerifyHttpCall.verified.txt │ │ └── Profile │ │ └── ProfileClientTests.Returns_Test_Profile.verified.txt ├── Altinn.App.Analyzers.Tests │ └── testapp │ │ ├── .altinnstudio │ │ └── settings.json │ │ ├── .dockerignore │ │ ├── App │ │ ├── config │ │ │ └── texts │ │ │ │ └── resource.nb.json │ │ ├── ui │ │ │ ├── form │ │ │ │ ├── Settings.json │ │ │ │ └── layouts │ │ │ │ │ └── Side1.json │ │ │ ├── layout-sets.json │ │ │ └── footer.json │ │ ├── appsettings.Production.json │ │ └── appsettings.Staging.json │ │ ├── Directory.Build.props │ │ └── deployment │ │ └── Chart.yaml ├── Altinn.App.SourceGenerator.Tests │ └── DiagnosticTests.ClassNotFound_isAltinnApp=False.verified.txt ├── Altinn.App.Integration.Tests │ ├── _testapps │ │ ├── basic │ │ │ ├── .altinnstudio │ │ │ │ └── settings.json │ │ │ ├── Directory.Build.props │ │ │ ├── Directory.Packages.props │ │ │ ├── App │ │ │ │ ├── config │ │ │ │ │ └── texts │ │ │ │ │ │ └── resource.nb.json │ │ │ │ ├── ui │ │ │ │ │ ├── form │ │ │ │ │ │ ├── Settings.json │ │ │ │ │ │ └── layouts │ │ │ │ │ │ │ └── Side1.json │ │ │ │ │ └── layout-sets.json │ │ │ │ ├── appsettings.Production.json │ │ │ │ └── appsettings.Staging.json │ │ │ └── .dockerignore │ │ └── _shared │ │ │ └── IEndpointConfigurator.cs │ ├── _fixture │ │ ├── _snapshots │ │ │ └── FixtureTests.LogsConsumer.verified.txt │ │ └── TestApps.cs │ ├── CustomScopes │ │ └── _snapshots │ │ │ ├── CustomScopesTests.Full_auth=User_scope=altinn-instances.read-altinn-instances.write_7_Logs.verified.txt │ │ │ ├── CustomScopesTests.Full_auth=ServiceOwner_scope=altinn-serviceowner-instances.read-altinn-serviceowner-instances.write_7_Logs.verified.txt │ │ │ └── CustomScopesTests.Full_auth=SystemUser_scope=altinn-instances.read-altinn-instances.write_7_Logs.verified.txt │ └── Basic │ │ └── _snapshots │ │ ├── BasicAppTests.ContainerConnectivity_Pdf.verified.txt │ │ └── BasicAppTests.ContainerConnectivity_Localtest.verified.txt └── Altinn.App.Tests.Common │ ├── TestResources │ ├── config │ │ └── applicationmetadata.json │ └── jwtselfsignedcert.pfx │ ├── TestId.cs │ └── Data │ ├── Profile │ └── User │ │ ├── 1003.json │ │ ├── 1001.json │ │ ├── 12345.json │ │ └── 1002.json │ └── Register │ └── Party │ ├── 500000.json │ ├── 501337.json │ └── 512345.json ├── .csharpierignore ├── .github └── labeler.yml ├── .vscode ├── extensions.json └── settings.json ├── global.json └── src ├── Altinn.App.Analyzers └── AnalyzerReleases.Shipped.md ├── Altinn.App.Internal.Analyzers └── AnalyzerReleases.Shipped.md ├── Altinn.App.Core ├── Internal │ ├── AltinnCdn │ │ └── IAltinnCdnClient.cs │ └── Language │ │ └── LanguageConst.cs ├── Features │ ├── Cache │ │ └── IAppConfigurationCache.cs │ ├── Telemetry │ │ ├── Telemetry.FileAnalysis.cs │ │ ├── Telemetry.UserHelper.cs │ │ ├── Telemetry.FileValidation.cs │ │ ├── Telemetry.ApplicationLanguage.cs │ │ ├── Telemetry.Authentication.cs │ │ └── Signing │ │ │ └── Telemetry.SigningCallToActionService.cs │ └── Signing │ │ └── Exceptions │ │ ├── SigningException.cs │ │ └── SigneeProviderNotFoundException.cs ├── Models │ ├── Components.cs │ ├── Notifications │ │ └── Email │ │ │ └── EmailRecipient.cs │ └── LayoutSets.cs └── Configuration │ └── FrontEndSettings.cs └── Altinn.App.Clients.Fiks └── FiksArkiv └── Models └── MessagePayloadWrapper.cs /test/Altinn.App.Api.Tests/Data/apps/tdd/contributer-restriction/_testdata_/zero.pdf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.csharpierignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | .git/ 4 | *.xml 5 | *.csproj 6 | *.props 7 | *.targets 8 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | # Add 'triage' label to all new issues 2 | 'status/triage': 3 | - '/.*/' -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/secrets.json: -------------------------------------------------------------------------------- 1 | { 2 | "secretId": "local secret dummy data" 3 | } -------------------------------------------------------------------------------- /test/Altinn.App.Analyzers.Tests/testapp/.altinnstudio/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "repoType": "App" 3 | } -------------------------------------------------------------------------------- /test/Altinn.App.SourceGenerator.Tests/DiagnosticTests.ClassNotFound_isAltinnApp=False.verified.txt: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Implementation/TestData/AppMetadata/invalid.applicationmetadata.json: -------------------------------------------------------------------------------- 1 | I'm not json! -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Internal/App/TestData/AppMetadata/invalid.applicationmetadata.json: -------------------------------------------------------------------------------- 1 | I'm not json! -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_testapps/basic/.altinnstudio/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "repoType": "App" 3 | } -------------------------------------------------------------------------------- /test/Altinn.App.Tests.Common/TestResources/config/applicationmetadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "xunit/test-app" 3 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Implementation/TestData/AppPolicy/policy.xml: -------------------------------------------------------------------------------- 1 | 2 | policy -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Internal/App/TestData/AppPolicy/policy.xml: -------------------------------------------------------------------------------- 1 | 2 | policy -------------------------------------------------------------------------------- /test/Altinn.App.Tests.Common/TestId.cs: -------------------------------------------------------------------------------- 1 | namespace Altinn.App.Tests.Common; 2 | 3 | public sealed record TestId(Guid Value); 4 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Implementation/TestData/AppProcess/process.bpmn: -------------------------------------------------------------------------------- 1 | 2 | process -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Internal/App/TestData/AppProcess/process.bpmn: -------------------------------------------------------------------------------- 1 | 2 | process -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "redhat.vscode-yaml", 4 | "ms-dotnettools.csdevkit" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "8.0.416", 4 | "rollForward": "latestFeature", 5 | "allowPrerelease": false 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_testapps/basic/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Internal/Pdf/TestData/example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/altinn/app-lib-dotnet/main/test/Altinn.App.Core.Tests/Internal/Pdf/TestData/example.pdf -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/.editorconfig: -------------------------------------------------------------------------------- 1 | # Shared tests uses only two spaces for json formatting 2 | [*.json] 3 | indent_style = space 4 | indent_size = 2 5 | -------------------------------------------------------------------------------- /test/Altinn.App.Tests.Common/TestResources/jwtselfsignedcert.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/altinn/app-lib-dotnet/main/test/Altinn.App.Tests.Common/TestResources/jwtselfsignedcert.pfx -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/Instances/tdd/contributer-restriction/500600/0fc98a23-fe31-4ef5-8fb9-dd3f479354ce/blob/fc121812-0336-45fb-a75c-490df3ad510a.pretest: -------------------------------------------------------------------------------- 1 | Lat som at dette er en pdf fil 2 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_fixture/_snapshots/FixtureTests.LogsConsumer.verified.txt: -------------------------------------------------------------------------------- 1 | stdout line 1 2 | stdout line 2 3 | stdout line 3 4 | stderr line 1 5 | stderr line 2 6 | stderr line 3 -------------------------------------------------------------------------------- /test/Altinn.App.Analyzers.Tests/testapp/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .env 3 | .git 4 | .gitignore 5 | .vs 6 | .vscode 7 | docker-compose.yml 8 | docker-compose.*.yml 9 | */bin 10 | */obj 11 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/Instances/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore guid.json files 2 | ????????-????-????-????-????????????.json 3 | # ignore copied blobs 4 | **/blob/????????-????-????-????-???????????? 5 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/allows-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Allows 1 as true", 3 | "expression": ["and", 1, 1], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/allows-0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Allows 0 as false", 3 | "expression": ["or", 0, 0, 0], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/null-is-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Null is false", 3 | "expression": ["or", null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_fixture/TestApps.cs: -------------------------------------------------------------------------------- 1 | namespace Altinn.App.Integration.Tests; 2 | 3 | internal static class TestApps 4 | { 5 | public const string Basic = "basic"; 6 | } 7 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Features/Validators/expression-validation-tests/.editorconfig: -------------------------------------------------------------------------------- 1 | # Shared tests uses only two spaces for json formatting 2 | [*.json] 3 | indent_style = space 4 | indent_size = 2 5 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Internal/Process/ServiceTasks/Legacy/TestData/DummyDataType.cs: -------------------------------------------------------------------------------- 1 | namespace Altinn.App.Core.Tests.Internal.Process.ServiceTasks.TestData; 2 | 3 | public class DummyDataType { } 4 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/allows-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Allows 1 as true", 3 | "expression": ["or", 1, 1, false], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Analyzers.Tests/testapp/App/config/texts/resource.nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "nb", 3 | "resources": [ 4 | { 5 | "id": "appName", 6 | "value": "testapp" 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/all-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "All true inputs", 3 | "expression": ["and", true, true, true], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/allows-0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Allows 0 as false", 3 | "expression": ["and", true, 0, 0, 0], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/casts-to-boolean.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Casts 1 to a boolean", 3 | "expression": ["and", 1], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/null-is-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Null is false", 3 | "expression": ["and", true, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/not/not-inverts-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Not inverts false", 3 | "expression": ["not", false], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/not/not-inverts-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Not inverts true", 3 | "expression": ["not", true], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/all-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "All true inputs", 3 | "expression": ["or", true, true, true], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/last-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Last input false", 3 | "expression": ["or", true, true, false], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /src/Altinn.App.Analyzers/AnalyzerReleases.Shipped.md: -------------------------------------------------------------------------------- 1 | ; Shipped analyzer releases 2 | ; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md 3 | 4 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/Instances/ttd/service-tasks/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore guid.json files 2 | ????????-????-????-????-????????????.json 3 | # ignore copied blobs 4 | */*/blob/????????-????-????-????-???????????? -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/casts-to-boolean2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Casts 1.000 to a boolean", 3 | "expression": ["and", 1], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/last-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Last input false", 3 | "expression": ["and", true, true, false], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/allows-stringy-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Allows 'true' as true", 3 | "expression": ["or", "true"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /src/Altinn.App.Internal.Analyzers/AnalyzerReleases.Shipped.md: -------------------------------------------------------------------------------- 1 | ; Shipped analyzer releases 2 | ; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md 3 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/claims/12345.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "some:extra:claim", 4 | "value": "claimValue", 5 | "valueType": "http://www.w3.org/2001/XMLSchema#string" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/claims/1337.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "some:extra:claim", 4 | "value": "claimValue", 5 | "valueType": "http://www.w3.org/2001/XMLSchema#string" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/allows-stringy-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Allows 'false' as false", 3 | "expression": ["and", "false"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/concat/empty-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "No arguments results in empty string", 3 | "expression": ["concat"], 4 | "expects": "" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return result on success", 3 | "expression": ["if", true, 123.456], 4 | "expects": 123.456 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/allows-stringy-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Allows 'false' as false", 3 | "expression": ["or", "false"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/round-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be able to round a null", 3 | "expression": ["round", null], 4 | "expects": "0" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/text/null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return null when the input is null", 3 | "expression": ["text", null], 4 | "expects": null 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/allows-stringy-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Allows 'true' as true", 3 | "expression": ["and", true, "true"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/concat/one-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "One arguments returns the same", 3 | "expression": ["concat", "test"], 4 | "expects": "test" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/same-types-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with null", 3 | "expression": ["equals", null, null], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/error-parseNumber.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date", 3 | "expression": ["formatDate", 2], 4 | "expectsFailure": "" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/error-parseTrue.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date", 3 | "expression": ["formatDate", true], 4 | "expectsFailure": "" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/falsy-0-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should treat a 0 as a boolean false", 3 | "expression": ["if", 0, 123.456], 4 | "expects": null 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/null-otherwise.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return null on failure", 3 | "expression": ["if", false, 123.456], 4 | "expects": null 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/truthy-1-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should treat a 1 as a boolean true", 3 | "expression": ["if", 1, 123.456], 4 | "expects": 123.456 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/not/not-changes-null-to-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Not changes not null to true", 3 | "expression": ["not", null], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/single-input-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Single input returns the same (true)", 3 | "expression": ["or", true], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/round-null2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be able to round a null", 3 | "expression": ["round", null, 2], 4 | "expects": "0.00" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/CustomScopes/_snapshots/CustomScopesTests.Full_auth=User_scope=altinn-instances.read-altinn-instances.write_7_Logs.verified.txt: -------------------------------------------------------------------------------- 1 | [basic/custom-scopes] [INIT INFO] Fixture configuration updated -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_testapps/basic/Directory.Packages.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/apps/tdd/contributer-restriction/_testdata_/example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/altinn/app-lib-dotnet/main/test/Altinn.App.Api.Tests/Data/apps/tdd/contributer-restriction/_testdata_/example.pdf -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/apps/tdd/eformidling-app/config/texts/resource.nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "nb", 3 | "resources": [ 4 | { 5 | "id": "ServiceName", 6 | "value": "eformidling-app" 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/allows-stringy-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Allows stringy 1 as true", 3 | "expression": ["and", "1", "1.0", "1.0000"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/single-input-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Single input returns the same (false)", 3 | "expression": ["and", false], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/single-input-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Single input returns the same (true)", 3 | "expression": ["and", true], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/same-types-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (true)", 3 | "expression": ["equals", 2, 2], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/parseNull-returnsNull.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date", 3 | "expression": ["formatDate", null], 4 | "expects": null 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/same-types-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with nulls", 3 | "expression": ["lessThan", null, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/same-types-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with null", 3 | "expression": ["notEquals", null, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/single-input-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Single input returns the same (false)", 3 | "expression": ["or", false], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/nearest-integer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should round to nearest integer", 3 | "expression": ["round", 3.2, null], 4 | "expects": "3" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/invalid/empty-array.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Empty array gives error", 3 | "expression": [], 4 | "expectsFailure": "Missing function name in expression" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_testapps/basic/App/config/texts/resource.nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "nb", 3 | "resources": [ 4 | { 5 | "id": "appName", 6 | "value": "basic" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/apps/tdd/contributer-restriction/_testdata_/example.jpg.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/altinn/app-lib-dotnet/main/test/Altinn.App.Api.Tests/Data/apps/tdd/contributer-restriction/_testdata_/example.jpg.pdf -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/allows-stringy-0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Allows stringy 0 as false", 3 | "expression": ["and", "0", "0.0", "0.0000"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/contains/null4.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should treat stringy nulls as null", 3 | "expression": ["contains", "null", "null"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/endsWith/ends-with-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "No string ends with a null", 3 | "expression": ["endsWith", "Hello", null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/same-types-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (true)", 3 | "expression": ["equals", 2.5, 2.5], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/same-types-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (false)", 3 | "expression": ["equals", 1, 2], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/same-types-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with nulls", 3 | "expression": ["greaterThan", null, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/falsy-0-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should treat a stringy 0 as a boolean false", 3 | "expression": ["if", "0", 123.456], 4 | "expects": null 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/truthy-1-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should treat a stringy 1 as a boolean true", 3 | "expression": ["if", "1", 123.456], 4 | "expects": 123.456 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/same-types-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with nulls", 3 | "expression": ["lessThanEq", null, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lowerCase/null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return a null when the input is a null", 3 | "expression": ["lowerCase", null], 4 | "expects": null 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/not/not-handles-numeric-zero-as-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Not handles numeric zero as true", 3 | "expression": ["not", 0], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/round-negative-number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should round negative number", 3 | "expression": ["round", -2.999, null], 4 | "expects": "-3" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringLength/null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return 0 when the input is a null", 3 | "expression": ["stringLength", null], 4 | "expects": 0 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringSlice/simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should slice a simple string", 3 | "expression": ["stringSlice", "hello", 1, 4], 4 | "expects": "ell" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/upperCase/null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return a null when the input is a null", 3 | "expression": ["upperCase", null], 4 | "expects": null 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/resources/nav_tiltakAvtaleOmArbeidstrening.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/altinn/app-lib-dotnet/main/test/Altinn.App.Api.Tests/Data/authorization/resources/nav_tiltakAvtaleOmArbeidstrening.json -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/roles/User_1002/party_500000/roles.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Type": "altinn", 4 | "value": "A0237" 5 | }, 6 | { 7 | "Type": "altinn", 8 | "value": "A0238" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/disallows-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Disallows 2 as true", 3 | "expression": ["and", 2, true], 4 | "expectsFailure": "Expected boolean, got value 2" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/empty-and.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Empty input produces an error", 3 | "expression": ["and"], 4 | "expectsFailure": "Expected 1+ argument(s), got 0" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/contains/empty-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should always contain en empty string", 3 | "expression": ["contains", "Hello", ""], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/endsWith/empty-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "All strings ends with an empty string", 3 | "expression": ["endsWith", "Hello", ""], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/same-types-bool-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with booleans (true)", 3 | "expression": ["equals", false, false], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/same-types-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (false)", 3 | "expression": ["equals", 1.5, 2.5], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/same-types-float-false2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with -floats (false)", 3 | "expression": ["equals", -2.5, 2.5], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/same-types-string-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (true)", 3 | "expression": ["equals", "bar", "bar"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/same-types-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with nulls", 3 | "expression": ["greaterThanEq", null, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/same-types-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (true)", 3 | "expression": ["lessThan", 122, 123], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lowerCaseFirst/number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should accept, but just return a number", 3 | "expression": ["lowerCaseFirst", 789], 4 | "expects": "789" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notContains/null4.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should treat stringy nulls as null", 3 | "expression": ["notContains", "null", "null"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/same-types-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (false)", 3 | "expression": ["notEquals", 2, 2], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/same-types-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (true)", 3 | "expression": ["notEquals", 2, 25], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/disallows-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Disallows 2 as true", 3 | "expression": ["or", 2, true], 4 | "expectsFailure": "Expected boolean, got value 2" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/empty-or.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Empty input produces an error", 3 | "expression": ["or"], 4 | "expectsFailure": "Expected 1+ argument(s), got 0" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/startsWith/null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should always be false when given a null", 3 | "expression": ["startsWith", null, "null"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/startsWith/null2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should always be false when given a null", 3 | "expression": ["startsWith", null, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringIndexOf/whitespace.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Whitespace should be counted", 3 | "expression": ["stringIndexOf", " foo", "foo"], 4 | "expects": 4 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringLength/string-length.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return the length of a string", 3 | "expression": ["stringLength", "Hello"], 4 | "expects": 5 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/upperCaseFirst/number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should accept, but just return a number", 3 | "expression": ["upperCaseFirst", 789], 4 | "expects": "789" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/apps/tdd/permissive-app/ui/default/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/schemas/json/layout/layoutSettings.schema.v1.json", 3 | "pages": { 4 | "order": [ 5 | "page" 6 | ] 7 | } 8 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/argv/simple-0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Simple: Read arg 0", 3 | "expression": ["argv", 0], 4 | "expects": "foo", 5 | "positionalArguments": ["foo", "bar"] 6 | } 7 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/argv/simple-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Simple: Read arg 1", 3 | "expression": ["argv", 1], 4 | "expects": 1234, 5 | "positionalArguments": ["foo", 1234] 6 | } 7 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/commaContains/null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should not contain a null value", 3 | "expression": ["commaContains", "40, 50, 60", null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/commaContains/null2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should not split a null value", 3 | "expression": ["commaContains", null, "hello world"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/concat/casts-numbers.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Casts numbers to strings", 3 | "expression": ["concat", 1, " + ", 2.5, " = ", 3], 4 | "expects": "1 + 2.5 = 3" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/contains/case-sensitivity.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should not match case sensitive", 3 | "expression": ["contains", "Hello", "hello"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/contains/null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should always return false when the input is null", 3 | "expression": ["contains", null, "null"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/contains/null3.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should always return false when the input is null", 3 | "expression": ["contains", null, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/null-case-insensitive.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Null is compared case-insensitively", 3 | "expression": ["equals", "nULL", null], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/same-types-bool-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with booleans (false)", 3 | "expression": ["equals", true, false], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/same-types-string-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (false)", 3 | "expression": ["equals", "foo", "bar"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/same-types-string-true2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (true)", 3 | "expression": ["equals", "true", "true"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/same-types-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (true)", 3 | "expression": ["greaterThan", 123, 122], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/language/should-return-nb-if-not-set.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should default to nb if no profile is set", 3 | "expression": ["language"], 4 | "expects": "nb" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/same-types-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (false)", 3 | "expression": ["lessThan", 123, 123], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/same-types-string-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (false)", 3 | "expression": ["lessThan", "1.5", "1"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/same-types-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (false)", 3 | "expression": ["lessThanEq", 123, 122], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/same-types-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (true)", 3 | "expression": ["lessThanEq", 122, 122], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lowerCase/should-lowercase-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should lowercase the string", 3 | "expression": ["lowerCase", "HELLO"], 4 | "expects": "hello" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notContains/null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should always return true if the input is null", 3 | "expression": ["notContains", null, null], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/same-types-bool-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with booleans (true)", 3 | "expression": ["notEquals", false, true], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/same-types-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (true)", 3 | "expression": ["notEquals", 2.51, 2.5], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/round-0-decimal-places.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be able to round 0 to 0 decimal places", 3 | "expression": ["round", 0, 0], 4 | "expects": "0" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringIndexOf/number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should find the index of a number", 3 | "expression": ["stringIndexOf", 123456789, "345"], 4 | "expects": 2 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/upperCase/should-uppercase-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should UPPERCASE the string", 3 | "expression": ["upperCase", "hello"], 4 | "expects": "HELLO" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/invalid/missing-args.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Missing arguments produces an error", 3 | "expression": ["equals"], 4 | "expectsFailure": "Expected 2 argument(s), got 0" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_testapps/basic/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .env 3 | .git 4 | .gitignore 5 | .vs 6 | .vscode 7 | docker-compose.yml 8 | docker-compose.*.yml 9 | */bin 10 | */obj 11 | !_packages/* 12 | !_shared/* 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Analyzers.Tests/testapp/App/ui/form/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layoutSettings.schema.v1.json", 3 | "pages": { 4 | "order": ["Side1"] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-equals/equals-strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Simple equals test with string", 3 | "expression": ["compare", "yes", "equals", "yes"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-greaterThan/greaterThan-simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Simple greaterThan test", 3 | "expression": ["compare", 5, "greaterThan", 4], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/contains/null2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should always return false when the input is null", 3 | "expression": ["contains", "null", null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-float-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (true)", 3 | "expression": ["equals", 123, 123], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-float-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, null] (false)", 3 | "expression": ["equals", 0, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-int-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [integer, null] (false)", 3 | "expression": ["equals", 0, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/error-parseFalse.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "formatDate should error when given false", 3 | "expression": ["formatDate", false], 4 | "expectsFailure": "" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/negative-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-string, integer] (1)", 3 | "expression": ["greaterThan", "-55", -57], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/same-types-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (false)", 3 | "expression": ["greaterThan", 123, 123], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/same-types-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (true)", 3 | "expression": ["greaterThanEq", 122, 122], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-int-null-false3.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [0, null] (false)", 3 | "expression": ["lessThan", 0, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/same-types-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (false)", 3 | "expression": ["lessThan", 123.456, 123.456], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/same-types-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (true)", 3 | "expression": ["lessThan", 123.455, 123.456], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/same-types-string-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (true)", 3 | "expression": ["lessThan", "1.001", "1.1"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/same-types-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (true)", 3 | "expression": ["lessThanEq", 123.456, 123.456], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/same-types-string-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (false)", 3 | "expression": ["lessThanEq", "1.5", "1"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notContains/case-sensitivity.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should not match case sensitive", 3 | "expression": ["notContains", "Hello", "hello"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notContains/null2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should always return true if the input is null", 3 | "expression": ["notContains", "null", null], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notContains/null3.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should always return true if the input is null", 3 | "expression": ["notContains", null, "null"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/same-types-bool-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with booleans (false)", 3 | "expression": ["notEquals", false, false], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/same-types-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (false)", 3 | "expression": ["notEquals", 12.56, 12.56], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/same-types-string-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (false)", 3 | "expression": ["notEquals", "bar", "bar"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/same-types-string-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (true)", 3 | "expression": ["notEquals", "foo", "bar"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/round-0-decimal-places2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be able to round 0 to 0 decimal places", 3 | "expression": ["round", 2.9999, 0], 4 | "expects": "3" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/startsWith/empty-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "All strings start with an empty string", 3 | "expression": ["startsWith", "Hello world", ""], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Analyzers.Tests/testapp/App/appsettings.Production.json: -------------------------------------------------------------------------------- 1 | { 2 | "ExampleSection": { 3 | "ExampleValue": "The values in this file will overwrite values from the appsettings.json file if the current environment is Production." 4 | } 5 | } -------------------------------------------------------------------------------- /test/Altinn.App.Analyzers.Tests/testapp/App/appsettings.Staging.json: -------------------------------------------------------------------------------- 1 | { 2 | "ExampleSection": { 3 | "ExampleValue": "The values in this file will overwrite values from the appsettings.json file if the current environment is Staging (TT02)." 4 | } 5 | } -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/apps/tdd/contributer-restriction/ui/default/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/schemas/json/layout/layoutSettings.schema.v1.json", 3 | "pages": { 4 | "order": [ 5 | "page" 6 | ] 7 | } 8 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/commaContains/empty-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should not contain an empty string", 3 | "expression": ["commaContains", "40, 50, 60", ""], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-greaterThan/greaterThan-simple2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Simple greaterThan test (2)", 3 | "expression": ["compare", 5, "greaterThan", 8], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-bool-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [boolean, float] (false)", 3 | "expression": ["equals", false, 0], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-bool-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [boolean, integer] (false)", 3 | "expression": ["equals", true, 1], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-bool-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [boolean, null] (false)", 3 | "expression": ["equals", false, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-float-int-false2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-float, integer] (false)", 3 | "expression": ["equals", -123, 123], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-string-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (true)", 3 | "expression": ["equals", "1234", 1234], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-string-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, null] (false)", 3 | "expression": ["equals", "nil", null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-string-null-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, null] (true)", 3 | "expression": ["equals", "null", null], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/false-case-insensitive.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Booleans are compared case-insensitively", 3 | "expression": ["equals", "FalSE", false], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/false-case-insensitive2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Booleans are compared case-insensitively (2)", 3 | "expression": ["equals", "TRUE", true], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-int-null-false3.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [0, null] (false)", 3 | "expression": ["greaterThan", 0, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/negative-string2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-string, integer] (2)", 3 | "expression": ["greaterThan", "-55", -54], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/same-types-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (false)", 3 | "expression": ["greaterThan", 123.456, 123.456], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/same-types-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (true)", 3 | "expression": ["greaterThan", 123.456, 123.455], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/same-types-string-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (false)", 3 | "expression": ["greaterThan", "1", "1.5"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/same-types-string-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (true)", 3 | "expression": ["greaterThan", "1.1", "1.001"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/same-types-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with integers (false)", 3 | "expression": ["greaterThanEq", 122, 123], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/same-types-string-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (false)", 3 | "expression": ["greaterThanEq", "1", "1.5"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/same-types-string-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (true)", 3 | "expression": ["greaterThanEq", "1.1", "1.1"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/else-otherwise.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return else result on failure", 3 | "expression": ["if", false, 123.456, "else", 456.123], 4 | "expects": 456.123 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/else-otherwise2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return else result on failure (2)", 3 | "expression": ["if", false, 123.456, "else", false], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-int-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [integer, null] (false)", 3 | "expression": ["lessThan", 1, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-int-null-false2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-integer, null] (false)", 3 | "expression": ["lessThan", -1, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-string-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (true)", 3 | "expression": ["lessThan", "2", 3], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-string-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, null] (false)", 3 | "expression": ["lessThan", "12", null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-int-null-false3.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [0, null] (false)", 3 | "expression": ["lessThanEq", 0, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-string-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, null] (false)", 3 | "expression": ["lessThanEq", "12", null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/same-types-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (false)", 3 | "expression": ["lessThanEq", 123.457, 123.456], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/same-types-string-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with strings (true)", 3 | "expression": ["lessThanEq", "1.001", "1.001"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lowerCase/should-lowercase-whole-word.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should lowercase the whole string", 3 | "expression": ["lowerCase", "HElLo"], 4 | "expects": "hello" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lowerCaseFirst/simple1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should lowercase the first letter of the string", 3 | "expression": ["lowerCaseFirst", "HELLO"], 4 | "expects": "hELLO" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/not/not-errors-on-zero-arguments.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Not errors zero arguments", 3 | "expression": ["not"], 4 | "expectsFailure": "Expected 1 argument(s), got 0" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-bool-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [boolean, integer] (true)", 3 | "expression": ["notEquals", true, 1], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-bool-null-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [boolean, null] (true)", 3 | "expression": ["notEquals", true, null], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-float-null-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, null] (true)", 3 | "expression": ["notEquals", 0, null], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-int-null-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [integer, null] (true)", 3 | "expression": ["notEquals", 0, null], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringIndexOf/look-in-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return null when looking in null", 3 | "expression": ["stringIndexOf", null, "foo"], 4 | "expects": null 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringIndexOf/not-found.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "When substring is not found, returns null", 3 | "expression": ["stringIndexOf", "foo bar", "baz"], 4 | "expects": null 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringIndexOf/simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should find the index of a substring", 3 | "expression": ["stringIndexOf", "Hello, world!", "world"], 4 | "expects": 7 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringLength/empty-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return the length of a string even when it's empty", 3 | "expression": ["stringLength", ""], 4 | "expects": 0 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringSlice/end-too-large.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work even if end index is too large", 3 | "expression": ["stringSlice", "hello", 4, 10], 4 | "expects": "o" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringSlice/start-too-large.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work even if start index is too large", 3 | "expression": ["stringSlice", "hello", 10], 4 | "expects": "" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/upperCase/should-uppercase-whole-word.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should UPPERCASE the whole string", 3 | "expression": ["upperCase", "heLlo"], 4 | "expects": "HELLO" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/upperCaseFirst/simple1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should uppercase the first letter of the string", 3 | "expression": ["upperCaseFirst", "hello"], 4 | "expects": "Hello" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/CustomScopes/_snapshots/CustomScopesTests.Full_auth=ServiceOwner_scope=altinn-serviceowner-instances.read-altinn-serviceowner-instances.write_7_Logs.verified.txt: -------------------------------------------------------------------------------- 1 | [basic/custom-scopes] [INIT INFO] Fixture configuration updated -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/apps/ttd/service-tasks/ui/form/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layoutSettings.schema.v1.json", 3 | "pages": { 4 | "order": ["Side1"] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/disallows-empty-strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Disallows empty strings", 3 | "expression": ["and", true, ""], 4 | "expectsFailure": "Expected boolean, got value \"\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-equals/not-equals-strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Simple not-equals test with string", 3 | "expression": ["compare", "yes", "equals", "no"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isSameDay/errors-with-number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "errors with number", 3 | "expression": ["compare", 2020, "not", "isSameDay", "2022"], 4 | "expectsFailure": "" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/concat/nulls-are-empty-strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Nulls are represented as empty strings", 3 | "expression": ["concat", "foo", null, "bar"], 4 | "expects": "foobar" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/contains/partial-match.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return true if the string contains the substring", 3 | "expression": ["contains", "abc", "b"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-float-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (false)", 3 | "expression": ["equals", 123.0001, 123], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-string-bool-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, boolean] (true)", 3 | "expression": ["equals", "false", false], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-string-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (false)", 3 | "expression": ["equals", "1234", 1234.55], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-int-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [integer, null] (false)", 3 | "expression": ["greaterThan", 1, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-string-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (true)", 3 | "expression": ["greaterThan", "3", 2], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-string-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, null] (false)", 3 | "expression": ["greaterThan", "12", null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/negative-string-float.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-string, float] (1)", 3 | "expression": ["greaterThan", "-55.5", -55.3], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/negative-string-float2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-string, float] (2)", 3 | "expression": ["greaterThan", "-55.5", -55.7], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-int-null-false3.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [0, null] (false)", 3 | "expression": ["greaterThanEq", 0, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/same-types-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (false)", 3 | "expression": ["greaterThanEq", 123.455, 123.456], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/same-types-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with floats (true)", 3 | "expression": ["greaterThanEq", 123.455, 123.455], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-float-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (false)", 3 | "expression": ["lessThan", 123.456, 123], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-float-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (true)", 3 | "expression": ["lessThan", 123.456, 124], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-float-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, null] (false)", 3 | "expression": ["lessThan", 123.456, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-string-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (true)", 3 | "expression": ["lessThan", "122", 123.456], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-string-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (false)", 3 | "expression": ["lessThan", "123", 1], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-float-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (true)", 3 | "expression": ["lessThanEq", 124, 124], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-int-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [integer, null] (false)", 3 | "expression": ["lessThanEq", 1, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-int-null-false2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-integer, null] (false)", 3 | "expression": ["lessThanEq", -1, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-string-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (true)", 3 | "expression": ["lessThanEq", "2", 2], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-bool-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [boolean, float] (true)", 3 | "expression": ["notEquals", false, 0.0005], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-float-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (false)", 3 | "expression": ["notEquals", 123, 123], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-float-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (true)", 3 | "expression": ["notEquals", 123.005, 123], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-string-bool-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, boolean] (true)", 3 | "expression": ["notEquals", "0", false], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-string-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (false)", 3 | "expression": ["notEquals", "55", 55], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-string-null-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, null] (true)", 3 | "expression": ["notEquals", "false", null], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/disallows-empty-strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Disallows empty strings", 3 | "expression": ["or", true, ""], 4 | "expectsFailure": "Expected boolean, got value \"\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringIndexOf/look-for-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return null when looking for null", 3 | "expression": ["stringIndexOf", "foo bar", null], 4 | "expects": null 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringSlice/negative-start.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with a negative start index", 3 | "expression": ["stringSlice", "filename.pdf", -3], 4 | "expects": "pdf" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_testapps/basic/App/ui/form/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layoutSettings.schema.v1.json", 3 | "pages": { 4 | "order": ["Side1"] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/Altinn.App.Analyzers.Tests/testapp/App/ui/form/layouts/Side1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", 3 | "data": { 4 | "hidden": false, 5 | "layout": [] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/endsWith/ends-with.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be true when the string ends with the specified string", 3 | "expression": ["endsWith", "Hello", "lo"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-string-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (true)", 3 | "expression": ["equals", "1234.5678", 1234.5678], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-string-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (false)", 3 | "expression": ["equals", "hello world", 55], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-float-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (false)", 3 | "expression": ["greaterThan", 123.456, 124], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-float-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (true)", 3 | "expression": ["greaterThan", 123.456, 123], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-float-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, null] (false)", 3 | "expression": ["greaterThan", 123.456, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-int-null-false2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-integer, null] (false)", 3 | "expression": ["greaterThan", -1, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-string-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (false)", 3 | "expression": ["greaterThan", "1", 123], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-float-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (true)", 3 | "expression": ["greaterThanEq", 123, 123], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-int-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [integer, null] (false)", 3 | "expression": ["greaterThanEq", 1, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-int-null-false2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-integer, null] (false)", 3 | "expression": ["greaterThanEq", -1, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-string-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (true)", 3 | "expression": ["greaterThanEq", "2", 2], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-string-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, null] (false)", 3 | "expression": ["greaterThanEq", "12", null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/fail-5.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail when given a 5 as a boolean true", 3 | "expression": ["if", 5, 123.456], 4 | "expectsFailure": "Expected boolean, got value 5" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-float-null-false2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-float, null] (false)", 3 | "expression": ["lessThan", -123.456, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-string-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (false)", 3 | "expression": ["lessThan", "124", 123.456], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/same-types-bool.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with booleans", 3 | "expression": ["lessThan", true, true], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-float-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (false)", 3 | "expression": ["lessThanEq", 123.456, 123], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-float-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, null] (false)", 3 | "expression": ["lessThanEq", 123.456, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-float-null-false2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-float, null] (false)", 3 | "expression": ["lessThanEq", -123.456, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-string-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (false)", 3 | "expression": ["lessThanEq", "123", 1], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/not/not-errors-on-two-arguments.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Not errors two arguments", 3 | "expression": ["not", 3, 34, 5], 4 | "expectsFailure": "Expected 1 argument(s), got 3" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-string-int-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (true)", 3 | "expression": ["notEquals", "12345", 1234], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-string-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, null] (false)", 3 | "expression": ["notEquals", "null", null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/or/disallows-other-strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Disallows other strings", 3 | "expression": ["or", true, "yes"], 4 | "expectsFailure": "Expected boolean, got value \"yes\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringLength/length-of-unicode.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return the number of characters in a unicode string", 3 | "expression": ["stringLength", "æøå"], 4 | "expects": 3 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringSlice/negative-end.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with a negative end index", 3 | "expression": ["stringSlice", "filename.pdf", 0, -4], 4 | "expects": "filename" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_testapps/basic/App/appsettings.Production.json: -------------------------------------------------------------------------------- 1 | { 2 | "ExampleSection": { 3 | "ExampleValue": "The values in this file will overwrite values from the appsettings.json file if the current environment is Production." 4 | } 5 | } -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_testapps/basic/App/appsettings.Staging.json: -------------------------------------------------------------------------------- 1 | { 2 | "ExampleSection": { 3 | "ExampleValue": "The values in this file will overwrite values from the appsettings.json file if the current environment is Staging (TT02)." 4 | } 5 | } -------------------------------------------------------------------------------- /src/Altinn.App.Core/Internal/AltinnCdn/IAltinnCdnClient.cs: -------------------------------------------------------------------------------- 1 | namespace Altinn.App.Core.Internal.AltinnCdn; 2 | 3 | internal interface IAltinnCdnClient : IDisposable 4 | { 5 | Task GetOrgs(CancellationToken cancellationToken = default); 6 | } 7 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Internal/App/AppMetadataTest.GetApplicationMetadata_desrializes_file_from_disk.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | Activities: [ 3 | { 4 | Name: ApplicationMetadata.Client.Get, 5 | IdFormat: W3C, 6 | HasParent: false 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/and/disallows-other-strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Disallows other strings", 3 | "expression": ["and", true, "yes"], 4 | "expectsFailure": "Expected boolean, got value \"yes\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/argv/arg-can-be-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Positional argument can also be null", 3 | "expression": ["argv", 1], 4 | "expects": null, 5 | "positionalArguments": ["foo", null, 5] 6 | } 7 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isBefore/date-simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "A simple case comparing two dates", 3 | "expression": ["compare", "2020-01-01", "isBefore", "2020-01-02"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/contains/exact-match.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return true if the first string contains the second string", 3 | "expression": ["contains", "abc", "abc"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/endsWith/number-ends-with-number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be true when the given number ends with the given digit", 3 | "expression": ["endsWith", 102, 2], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/diff-types-string-bool-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, boolean] (false)", 3 | "expression": ["equals", "hello world", false], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/too-few-args.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Too few arguments give an error", 3 | "expression": ["equals", true, ["equals"]], 4 | "expectsFailure": "Expected 2 argument(s), got 0" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-float-null-false2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-float, null] (false)", 3 | "expression": ["greaterThan", -123.456, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-string-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (false)", 3 | "expression": ["greaterThan", "122", 123.456], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-string-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (true)", 3 | "expression": ["greaterThan", "124", 123.456], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-float-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, integer] (false)", 3 | "expression": ["greaterThanEq", 123.9999, 124], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-float-null-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [float, null] (false)", 3 | "expression": ["greaterThanEq", 123.456, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-string-int-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, integer] (false)", 3 | "expression": ["greaterThanEq", "1", 123], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/fail-empty-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail when given empty string", 3 | "expression": ["if", "", 123.456], 4 | "expectsFailure": "Expected boolean, got value \"\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-string-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (false)", 3 | "expression": ["lessThanEq", "124", 123.456], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-string-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (true)", 3 | "expression": ["lessThanEq", "123.456", 123.456], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/same-types-bool.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with booleans", 3 | "expression": ["lessThanEq", true, true], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-string-bool-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, boolean] (false)", 3 | "expression": ["notEquals", "false", false], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-string-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (false)", 3 | "expression": ["notEquals", "1234.55", 1234.55], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/startsWith/start-with.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be true when the string starts with the specified string", 3 | "expression": ["startsWith", "Hello", "Hel"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringLength/length-of-number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return the length of a string even if it is type of number", 3 | "expression": ["stringLength", 203], 4 | "expects": 3 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringLength/whitespace-length.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should count whitespace as a character when counting string length", 3 | "expression": ["stringLength", " "], 4 | "expects": 1 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringReplace/multiple.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should replace multiple substrings", 3 | "expression": ["stringReplace", "Hel lo, wo rld !", " ", ""], 4 | "expects": "Hello,world!" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/invalid/extra-argument.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Extra argument in expression gives error", 3 | "expression": ["equals", true, false, 55], 4 | "expectsFailure": "Expected 2 argument(s), got 3" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/invalid/numeric-array.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Numeric array gives error", 3 | "expression": ["equals", [true, [1, 2, 3]]], 4 | "expectsFailure": "Function name in expression should be string" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/argv/error-no-args.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Errors when trying to read argument when none exist", 3 | "expression": ["argv", 0], 4 | "expectsFailure": "No positional arguments available" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isSameDay/not-sameDay-year.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "isSameDay with different years", 3 | "expression": ["compare", "2020-02-02", "isSameDay", "2022-02-02"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/concat/boolean-are-empty-strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Booleans encode as literal strings", 3 | "expression": ["concat", "foo", false, "bar", true], 4 | "expects": "foofalsebartrue" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/strings-case-sensitive.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Regular strings are compared case-sensitively", 3 | "expression": ["equals", "Hello World", "hello World"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/same-types-bool.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with booleans", 3 | "expression": ["greaterThan", true, true], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-float-null-false2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [-float, null] (false)", 3 | "expression": ["greaterThanEq", -123.456, null], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-string-float-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (false)", 3 | "expression": ["greaterThanEq", "122", 123.456], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-string-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (true)", 3 | "expression": ["greaterThanEq", "123.456", 123.456], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/same-types-bool.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with booleans", 3 | "expression": ["greaterThanEq", true, true], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lowerCase/lowercase-number-should-return-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return number as string when number is passed", 3 | "expression": ["lowerCase", 40], 4 | "expects": "40" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/not/not-errors-on-numbers-not-0-or-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Not errors on numbers not 0 or 1", 3 | "expression": ["not", 1337], 4 | "expectsFailure": "Expected boolean, got value 1337" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notContains/exact-match.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return false when the string does contain the substring", 3 | "expression": ["notContains", "abc", "abc"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notContains/not-match.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "should return true if the string does not contain the substring", 3 | "expression": ["notContains", "Hello", "Bye"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/notEquals/diff-types-string-float-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work with [string, float] (true)", 3 | "expression": ["notEquals", "1234.56789", 1234.5678], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/round-strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be able to round a number to the nearest integer even if it is a string", 3 | "expression": ["round", "3.99", null], 4 | "expects": "4" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/round-without-decimalCount.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be able to round a number without the optional second argument", 3 | "expression": ["round", "3.99"], 4 | "expects": "4" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/round-without-decimalCount2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be able to round a number without the optional second argument", 3 | "expression": ["round", 3.99], 4 | "expects": "4" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringIndexOf/emoji.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should count an emoji as 2 characters (as JS counts UTF-16 code units)", 3 | "expression": ["stringIndexOf", "🌍!", "!"], 4 | "expects": 2 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringSlice/end-before-start.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work when negative end index is before string starts", 3 | "expression": ["stringSlice", "hello", 0, -8], 4 | "expects": "" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/upperCase/uppercase-number-should-return-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return number as string when number is passed", 3 | "expression": ["upperCase", 40], 4 | "expects": "40" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/invalid/empty-array-inside.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Empty array inside expression gives error", 3 | "expression": ["equals", [], true], 4 | "expectsFailure": "Missing function name in expression" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/invalid/empty-object.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Empty object inside expression parsed as other expression", 3 | "expression": ["equals", true, {}], 4 | "expectsFailure": "Invalid type \"object\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_testapps/basic/App/ui/form/layouts/Side1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", 3 | "data": { 4 | "hidden": false, 5 | "layout": [] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Features/Cache/IAppConfigurationCache.cs: -------------------------------------------------------------------------------- 1 | using Altinn.App.Core.Models; 2 | 3 | namespace Altinn.App.Core.Features.Cache; 4 | 5 | internal interface IAppConfigurationCache 6 | { 7 | public ApplicationMetadata ApplicationMetadata { get; } 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Analyzers.Tests/testapp/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/contains/not-match.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "should return false if the second string does not contain the first string", 3 | "expression": ["contains", "Hello", "Bye"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/endsWith/not-ends-with.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be false when the string does not ends with the specified string", 3 | "expression": ["endsWith", "Hello", "me"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-bool-int.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, integer]", 3 | "expression": ["lessThan", true, 123], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-bool-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, null]", 3 | "expression": ["lessThan", true, null], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-string-bool.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [string, boolean]", 3 | "expression": ["lessThan", "1", true], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/startsWith/number-starts-with-number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be true when the given number starts with the given digit", 3 | "expression": ["startsWith", 102, 1], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringReplace/emoji.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should replace an emoji", 3 | "expression": ["stringReplace", "Hello, \uD83C\uDF0D!", "\uD83C\uDF0D", "planet"], 4 | "expects": "Hello, planet!" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringReplace/simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should find and replace a substring", 3 | "expression": ["stringReplace", "Hello, world!", "world", "planet"], 4 | "expects": "Hello, planet!" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/text/should-return-key-name-if-key-not-exist.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return 'key-name' when key does not exist", 3 | "expression": ["text", "random-key"], 4 | "expects": "random-key" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/Basic/_snapshots/BasicAppTests.ContainerConnectivity_Pdf.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | Success: true, 3 | StatusCode: 200, 4 | Url: http://pdf-service:5031/health/startup, 5 | ResponseContent: OK, 6 | Message: PDF service connectivity verified 7 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isBefore/date-empty-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "A date comparison with an empty string return false", 3 | "expression": ["compare", "2020-01-01", "isBefore", ""], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-bool-int.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, integer]", 3 | "expression": ["greaterThan", true, 123], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-bool-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, null]", 3 | "expression": ["greaterThan", true, null], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/fail-without-else.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail without \"else\" constant", 3 | "expression": ["if", true, 123.456, false], 4 | "expectsFailure": "Expected third argument to be \"else\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-bool-float.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, float]", 3 | "expression": ["lessThan", true, 123.456], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-bool-int.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, integer]", 3 | "expression": ["lessThanEq", true, 123], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-bool-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, null]", 3 | "expression": ["lessThanEq", true, null], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-string-bool.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [string, boolean]", 3 | "expression": ["lessThanEq", "1", true], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/not/not-changes-notNull-to-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Not errors on string \"notNull\"", 3 | "expression": ["not", "notNull"], 4 | "expectsFailure": "Expected boolean, got value \"notNull\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/nearest-integer-with-decimal.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should round a number to the nearest integer with a precision of 2", 3 | "expression": ["round", 3.2199999, 2], 4 | "expects": "3.22" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/round-with-too-many-args.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail when given too many arguments", 3 | "expression": ["round", 3.99, 2, 3], 4 | "expectsFailure": "Expected 1-2 argument(s), got 3" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringSlice/start-before-length.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should work when negative start index is before full string length", 3 | "expression": ["stringSlice", "hello", -8], 4 | "expects": "hello" 5 | } 6 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Internal/Language/LanguageConst.cs: -------------------------------------------------------------------------------- 1 | namespace Altinn.App.Core.Internal.Language; 2 | 3 | internal static class LanguageConst 4 | { 5 | internal const string Nb = "nb"; 6 | internal const string Nn = "nn"; 7 | internal const string En = "en"; 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Infrastructure/Clients/AccessManagement/AccessManagementClientTests.DelegateRights_VerifyHttpCall.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | Activities: [ 3 | { 4 | Name: AccessManagementClient.Delegate, 5 | IdFormat: W3C, 6 | HasParent: false 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Infrastructure/Clients/AccessManagement/AccessManagementClientTests.RevokeRights_VerifyHttpCall.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | Activities: [ 3 | { 4 | Name: AccessManagementClient.Revoke, 5 | IdFormat: W3C, 6 | HasParent: false 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isAfter/date-with-time.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "isAfter with time-formatted dates", 3 | "expression": ["compare", "2020-01-01 00:00:05", "isAfter", "2020-01-01T00:00:00"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isBefore/date-empty-string-and-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "A date comparison with empty string and null return false", 3 | "expression": ["compare", null, "isBefore", ""], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/endsWith/exact-match.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be true when the string ends with the specified string, even on exact match", 3 | "expression": ["endsWith", "Hello", "Hello"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/equals/too-many-args.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Too many arguments give an error", 3 | "expression": ["equals", true, ["equals", true, false, true]], 4 | "expectsFailure": "Expected 2 argument(s), got 3" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-bool-float.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, float]", 3 | "expression": ["greaterThan", true, 123.456], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-string-bool.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [string, boolean]", 3 | "expression": ["greaterThan", "1", true], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-bool-int.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, integer]", 3 | "expression": ["greaterThanEq", true, 123], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-bool-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, null]", 3 | "expression": ["greaterThanEq", true, null], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-string-bool.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [string, boolean]", 3 | "expression": ["greaterThanEq", "1", true], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/fail-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail when given a string as a boolean value", 3 | "expression": ["if", "string", 123.456], 4 | "expectsFailure": "Expected boolean, got value \"string\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-bool-float.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, float]", 3 | "expression": ["lessThanEq", true, 123.456], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/startsWith/not-starts-with.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be false when the string does not starts with the specified string", 3 | "expression": ["startsWith", "Hello", "Bye"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringReplace/replace-with-null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should allow replacing with null (as empty string)", 3 | "expression": ["stringReplace", "Hello, {0}!", "{0}", null], 4 | "expects": "Hello, !" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/unknown/function-wrong-case.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Function with wrong case gives an error", 3 | "expression": ["datamodel", "test"], 4 | "expectsFailure": "Function \"datamodel\" not implemented" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-equals/error-too-few-args.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail when given too few arguments", 3 | "expression": ["compare", "yes", "equals"], 4 | "expectsFailure": "Expected 3-4 argument(s), got 2" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isAfterEq/isAfterEq.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Compare isAfterEq with dates and time", 3 | "expression": ["compare", "2020-01-01 05:08:09", "isAfterEq", "2020-01-01 05:08:09.00"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/formats-time-in-format-specified.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format time in format specified", 3 | "expression": ["formatDate", "2023-10-30T14:54:00.000Z", "HH:mm"], 4 | "expects": "14:54" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-bool-float.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [boolean, float]", 3 | "expression": ["greaterThanEq", true, 123.456], 4 | "expectsFailure": "Expected number, got value true" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/fail-without-else2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail without \"else\" constant", 3 | "expression": ["if", true, 123.456, false, false], 4 | "expectsFailure": "Expected third argument to be \"else\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lowerCaseFirst/simple2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should lowercase the first letter when given multiple words", 3 | "expression": ["lowerCaseFirst", "HELLO WORLD FOO BAR"], 4 | "expects": "hELLO WORLD FOO BAR" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/startsWith/exact-match.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be true when the string starts with the specified string, even on exact match", 3 | "expression": ["startsWith", "Hello", "Hello"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/Basic/_snapshots/BasicAppTests.ContainerConnectivity_Localtest.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | Success: true, 3 | StatusCode: 200, 4 | Url: http://localtest:5101/health, 5 | ResponseContent: Healthy, 6 | Message: Localtest health endpoint connectivity verified 7 | } -------------------------------------------------------------------------------- /src/Altinn.App.Core/Features/Telemetry/Telemetry.FileAnalysis.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace Altinn.App.Core.Features; 4 | 5 | partial class Telemetry 6 | { 7 | internal Activity? StartAnalyseActivity() => ActivitySource.StartActivity("FileAnalysis.Analyse"); 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-error/notEquals-not-implemented.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "notEquals is not implemented here", 3 | "expression": ["compare", "yes", "notEquals", "no"], 4 | "expectsFailure": "Invalid operator \"notEquals\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isAfter/date-leap-year.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be able to understand a date only valid in a leap year", 3 | "expression": ["compare", "2020-02-29", "isAfter", "2020-02-28"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isBeforeEq/isBeforeEq.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Compare isBeforeEq with dates and time", 3 | "expression": ["compare", "2020-01-01 05:08:09", "isBeforeEq", "2020-01-01 05:08:09.00"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/formats-date-in-format-specified.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date in format specified", 3 | "expression": ["formatDate", "2023-10-30T14:54:00.000Z", "dd-MM.yy"], 4 | "expects": "30-10.23" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/formats-date-in-format-specified2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date in format specified (2)", 3 | "expression": ["formatDate", "2023-10-26T13:12:38.069Z", "dd.MM"], 4 | "expects": "26.10" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-d.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'd' as '4'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "d" 7 | ], 8 | "expects": "4" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-h.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'h' as '5'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "h" 7 | ], 8 | "expects": "5" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-m.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'm' as '6'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "m" 7 | ], 8 | "expects": "6" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-s.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 's' as '7'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "s" 7 | ], 8 | "expects": "7" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-h.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'H' as '5'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "H" 7 | ], 8 | "expects": "5" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-m.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'M' as '3'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "M" 7 | ], 8 | "expects": "3" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-s.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'S' as '1'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "S" 7 | ], 8 | "expects": "1" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThan/diff-types-string-null2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [string, null]", 3 | "expression": ["lessThan", "hello world", null], 4 | "expectsFailure": "Expected number, got value \"hello world\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/round/nearest-integer-with-decimal-as-strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should round a number to the nearest integer with a precision of 2", 3 | "expression": ["round", "2.2199999", "2"], 4 | "expects": "2.22" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/unknown/appSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Invalid function gives an error", 3 | "expression": ["equals", true, ["applicationSettings"]], 4 | "expectsFailure": "Function \"applicationSettings\" not implemented" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/invalid/func-not-implemented.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Non-implemented function gives error", 3 | "expression": ["non-existing-function", 1, 2], 4 | "expectsFailure": "Function \"non-existing-function\" not implemented" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/roles/User_1001/party_510001/roles.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Type": "altinn", 4 | "value": "regna" 5 | }, 6 | { 7 | "Type": "altinn", 8 | "value": "dagl" 9 | }, 10 | { 11 | "Type": "altinn", 12 | "value": "priv" 13 | } 14 | ] -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-dd.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'dd' as '04'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "dd" 7 | ], 8 | "expects": "04" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-hh.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'hh' as '05'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "hh" 7 | ], 8 | "expects": "05" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-mm.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'mm' as '06'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "mm" 7 | ], 8 | "expects": "06" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-ss.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'ss' as '07'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "ss" 7 | ], 8 | "expects": "07" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-u.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'u' as '2023'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "u" 7 | ], 8 | "expects": "2023" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-y.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'y' as '2023'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "y" 7 | ], 8 | "expects": "2023" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-yy.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'yy' as '23'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "yy" 7 | ], 8 | "expects": "23" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-hh.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'HH' as '05'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "HH" 7 | ], 8 | "expects": "05" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-mm.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'MM' as '03'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "MM" 7 | ], 8 | "expects": "03" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-ss.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'SS' as '12'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "SS" 7 | ], 8 | "expects": "12" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/diff-types-string-null2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [string, null]", 3 | "expression": ["greaterThan", "hello world", null], 4 | "expectsFailure": "Expected number, got value \"hello world\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/no-decimals-fail.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [string with no decimals, integer]", 3 | "expression": ["greaterThan", "55.", -57], 4 | "expectsFailure": "Expected number, got value \"55.\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/never-3-arguments.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail when given 3 arguments", 3 | "expression": ["if", false, 123.456, "else"], 4 | "expectsFailure": "Expected either 2 arguments (if) or 4 (if + else), got 3" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lessThanEq/diff-types-string-null2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [string, null]", 3 | "expression": ["lessThanEq", "hello world", null], 4 | "expectsFailure": "Expected number, got value \"hello world\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/startsWith/number-starts-with-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be true when the number starts with the given string (number starts with string)", 3 | "expression": ["startsWith", 40, "40"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Features/Telemetry/Telemetry.UserHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace Altinn.App.Core.Features; 4 | 5 | partial class Telemetry 6 | { 7 | internal Activity? StartGetUserContextActivity() => ActivitySource.StartActivity("UserHelper.GetUserContext"); 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/Instances/tdd/contributer-restriction/500600/09e16a2d-e009-4f3a-940b-da1ea54a18b4/blob/c52f40dd-11d1-4e24-b13b-4fcfdf6ca1c6.pretest: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Internal/Process/TestData/DummyModel.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | namespace Altinn.App.Core.Tests.Internal.Process.TestData; 3 | 4 | public class DummyModel 5 | { 6 | public string Submitter { get; set; } 7 | 8 | public decimal Amount { get; set; } 9 | } 10 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isSameDay/errors-with-only-year.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Errors with only year", 3 | "expression": ["compare", "2020", "isSameDay", "2020"], 4 | "expectsFailure": "Unable to parse date \"2020\": Unknown format" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/endsWith/ends-with-number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be true when the string ends with the given string (even when the given 'string' is a number)", 3 | "expression": ["endsWith", "Im 40", 40], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/formats-date.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date", 3 | "expression": ["formatDate", "2023-10-30T14:54:00.000Z"], 4 | "expects": "30.10.2023", 5 | "profileSettings": { 6 | "language": "nb" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-uu.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'uu' as '2023'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "uu" 7 | ], 8 | "expects": "2023" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-uuu.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'uuu' as '2023'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "uuu" 7 | ], 8 | "expects": "2023" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-yyy.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'yyy' as '2023'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "yyy" 7 | ], 8 | "expects": "2023" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-sss.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'SSS' as '120'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "SSS" 7 | ], 8 | "expects": "120" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/doble-dots-fail.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [string with two periods, integer]", 3 | "expression": ["greaterThan", "55.88.66", -57], 4 | "expectsFailure": "Expected number, got value \"55.88.66\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThanEq/diff-types-string-null2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [string, null]", 3 | "expression": ["greaterThanEq", "hello world", null], 4 | "expectsFailure": "Expected number, got value \"hello world\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringReplace/special-chars.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should find and replace special characters", 3 | "expression": ["stringReplace", "Hello, {[!@#$%^&*()]}!", "{[!@#$%^&*()]}", "planet"], 4 | "expects": "Hello, planet!" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/upperCaseFirst/simple2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should uppercase the first letter of the string when given multiple words", 3 | "expression": ["upperCaseFirst", "hello wOrld Foo bar"], 4 | "expects": "Hello wOrld Foo bar" 5 | } 6 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Features/Telemetry/Telemetry.FileValidation.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace Altinn.App.Core.Features; 4 | 5 | partial class Telemetry 6 | { 7 | internal Activity? StartFileValidateActivity() => ActivitySource.StartActivity("FileValidatorService.Validate"); 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/roles/User_1001/party_500000/roles.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Type": "altinn", 4 | "value": "A0239" 5 | }, 6 | { 7 | "Type": "altinn", 8 | "value": "A0240" 9 | }, 10 | { 11 | "Type": "altinn", 12 | "value": "A0241" 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/argv/error-no-such-arg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Errors when trying to read argument that does not exist", 3 | "expression": ["argv", 2], 4 | "expectsFailure": "Index 2 out of range", 5 | "positionalArguments": ["foo", 1234] 6 | } 7 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/endsWith/case-sensitivity.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be case sensitive and return false if the string does end with the given string but opposite case", 3 | "expression": ["endsWith", "Hello", "LO"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-uuuu.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'uuuu' as '2023'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "uuuu" 7 | ], 8 | "expects": "2023" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-lowercase-yyyy.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'yyyy' as '2023'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "yyyy" 7 | ], 8 | "expects": "2023" 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/no-decimals-fail-negative.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [-string with no decimals, integer]", 3 | "expression": ["greaterThan", "-55.", -57], 4 | "expectsFailure": "Expected number, got value \"-55.\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/unknown/invalid-function.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Invalid function gives an error", 3 | "expression": ["equals", true, ["functionThatDoesNotExist"]], 4 | "expectsFailure": "Function \"functionThatDoesNotExist\" not implemented" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/roles/User_12345/party_512345/roles.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Type": "altinn", 4 | "value": "regna" 5 | }, 6 | { 7 | "Type": "altinn", 8 | "value": "dagl" 9 | }, 10 | { 11 | "Type": "altinn", 12 | "value": "priv" 13 | } 14 | ] 15 | 16 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Implementation/EventsClientTest.AddEvent_RegisterEventWithInstanceOwnerOrganisation_CloudEventInRequestContainOrganisationNumber.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | Activities: [ 3 | { 4 | Name: EventClient.GetAsyncWithId, 5 | IdFormat: W3C, 6 | HasParent: false 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/lowerCase/should-lowercase-whole-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should lowercase the whole string when given a string has multiple words", 3 | "expression": ["lowerCase", "Hola, Como Estas?"], 4 | "expects": "hola, como estas?" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/startsWith/case-sensitivity.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be case sensitive and return false if the string does start with the given string but opposite case", 3 | "expression": ["startsWith", "Hello", "HEL"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/startsWith/start-with-number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should be true when the string starts with the given string (even when the given 'string' is a number)", 3 | "expression": ["startsWith", "40 years old", 40], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/stringLength/length-equals.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Two strings of equal length should be equal according to equals expression", 3 | "expression": ["equals", ["stringLength", "Hello"], ["stringLength", "World"]], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/upperCase/should-uppercase-whole-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should UPPERCASE the whole string when given a string has multiple words", 3 | "expression": ["upperCase", "Hola, como estas?"], 4 | "expects": "HOLA, COMO ESTAS?" 5 | } 6 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Features/Telemetry/Telemetry.ApplicationLanguage.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace Altinn.App.Core.Features; 4 | 5 | partial class Telemetry 6 | { 7 | internal Activity? StartGetApplicationLanguageActivity() => ActivitySource.StartActivity("ApplicationLanguage.Get"); 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/commaContains/should-include-word-in-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return true if the comma-separated list contains the given value", 3 | "expression": ["commaContains", "hello, bye, hola, adios", "hola"], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-error/error-wrong-operator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail when given an invalid operator", 3 | "expression": ["compare", 5, "is exactly the same as", 8], 4 | "expectsFailure": "Invalid operator \"is exactly the same as\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/formats-date-english.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date when only given a year", 3 | "expression": ["formatDate", "2023-01-01"], 4 | "expects": "1/1/23", 5 | "profileSettings": { 6 | "language": "en" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/greaterThan/doble-dots-fail-negative.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail with [-string with two periods, integer]", 3 | "expression": ["greaterThan", "-55.88.66", -57], 4 | "expectsFailure": "Expected number, got value \"-55.88.66\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/never-5-arguments.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail when given 5 arguments", 3 | "expression": ["if", false, 123.456, "else", "test", "something"], 4 | "expectsFailure": "Expected either 2 arguments (if) or 4 (if + else), got 5" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/language/should-return-profile-settings-preference.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return profileSetting language if set", 3 | "expression": ["language"], 4 | "expects": "en", 5 | "profileSettings": { 6 | "language": "en" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/Instances/ttd/service-tasks/501337/a2af1cfd-db99-45f9-9625-9dfa1223485f/blob/fd4c42a4-a6a0-4aec-b8e9-9f5d34c445ca.pretest: -------------------------------------------------------------------------------- 1 | Testnavn 2 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/formats-date-english2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date in english", 3 | "expression": ["formatDate", "2023-10-26T13:12:38.069Z"], 4 | "expects": "10/26/23", 5 | "profileSettings": { 6 | "language": "en" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/frontendSettings/lookup-case-sensitive.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontendSettings is case sensitive", 3 | "expression": ["frontendSettings", "MYSETTING1"], 4 | "expects": null, 5 | "frontendSettings": { 6 | "mySetting1": "foo" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Altinn.App.Clients.Fiks/FiksArkiv/Models/MessagePayloadWrapper.cs: -------------------------------------------------------------------------------- 1 | using Altinn.App.Clients.Fiks.FiksIO.Models; 2 | using KS.Fiks.Arkiv.Models.V1.Kodelister; 3 | 4 | namespace Altinn.App.Clients.Fiks.FiksArkiv.Models; 5 | 6 | internal sealed record MessagePayloadWrapper(FiksIOMessagePayload Payload, Kode FileTypeCode); 7 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/commaContains/string-list-include-number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return true if the comma-separated list contains the given value even if its provided as a number", 3 | "expression": ["commaContains", "40, 50, 60", 40], 4 | "expects": true 5 | } 6 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Features/Signing/Exceptions/SigningException.cs: -------------------------------------------------------------------------------- 1 | using Altinn.App.Core.Exceptions; 2 | 3 | namespace Altinn.App.Core.Features.Signing.Exceptions; 4 | 5 | internal class SigningException : AltinnException 6 | { 7 | public SigningException(string message) 8 | : base(message) { } 9 | } 10 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Models/Components.cs: -------------------------------------------------------------------------------- 1 | namespace Altinn.App.Core.Models; 2 | 3 | /// 4 | /// UI Components 5 | /// 6 | public class Components 7 | { 8 | /// 9 | /// Exclude from pdf 10 | /// 11 | public List? ExcludeFromPdf { get; set; } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/formats-date-time.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date-time from backend", 3 | "expression": ["formatDate", "2025-01-23T10:25:33.9729397+01:00"], 4 | "expects": "23.01.2025", 5 | "profileSettings": { 6 | "language": "nb" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/frontendSettings/simple-lookup.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Simple lookup", 3 | "expression": ["frontendSettings", "mySetting1"], 4 | "expects": "foo", 5 | "frontendSettings": { 6 | "mySetting1": "foo", 7 | "mySetting2": "bar" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Features/Telemetry/Telemetry.Authentication.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace Altinn.App.Core.Features; 4 | 5 | partial class Telemetry 6 | { 7 | internal Activity? StartRefreshAuthenticationTokenActivity() => 8 | ActivitySource.StartActivity($"Authentication.Refresh"); 9 | } 10 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/roles/User_1002/party_510002/roles.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Type": "altinn", 4 | "value": "regna" 5 | }, 6 | { 7 | "Type": "altinn", 8 | "value": "dagl" 9 | }, 10 | { 11 | "Type": "altinn", 12 | "value": "priv" 13 | } 14 | ] 15 | 16 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/roles/User_1003/party_510003/roles.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Type": "altinn", 4 | "value": "regna" 5 | }, 6 | { 7 | "Type": "altinn", 8 | "value": "dagl" 9 | }, 10 | { 11 | "Type": "altinn", 12 | "value": "priv" 13 | } 14 | ] 15 | 16 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/commaContains/should-not-include-word-in-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return false if the comma-separated list does not contain the given value", 3 | "expression": ["commaContains", "hello, bye, hola, adios", "Hasta luego"], 4 | "expects": false 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-error/error-not-not.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Third item should be not when given 5 items", 3 | "expression": ["compare", "yes", "equals", "no", "maybe"], 4 | "expectsFailure": "Second argument must be \"not\" when providing 4 arguments in total" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/apps/tdd/permissive-app/ui/layout-sets.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/schemas/json/layout/layout-sets.schema.v1.json", 3 | "sets":[ 4 | { 5 | "id": "default", 6 | "dataType": "default", 7 | "tasks": ["Task_1"] 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isBefore/error-date-invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should not parse a date with invalid format", 3 | "expression": ["compare", "2020-01-01 00/00/00", "isBefore", ""], 4 | "expectsFailure": "Unable to parse date \"2020-01-01 00/00/00\": Unknown format" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/if/fail-else-as-expr.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail when given an expression instead of 'else'", 3 | "expression": ["if", true, 123.456, ["if", true, "else", "else", "not-else?"], 654.321], 4 | "expectsFailure": "Expected third argument to be \"else\"" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Analyzers.Tests/testapp/deployment/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | description: A Helm chart for Kubernetes 3 | # name can only be lowercase. It is used in the templates. 4 | name: deployment 5 | version: 1.1.0 6 | 7 | dependencies: 8 | - name: deployment 9 | repository: https://charts.altinn.studio/ 10 | version: 3.0.1 11 | -------------------------------------------------------------------------------- /test/Altinn.App.Analyzers.Tests/testapp/App/ui/layout-sets.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout-sets.schema.v1.json", 3 | "sets": [ 4 | { 5 | "id": "form", 6 | "dataType": "model", 7 | "tasks": ["Task_1"] 8 | } 9 | ], 10 | "uiSettings": {} 11 | } 12 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/apps/tdd/contributer-restriction/ui/layout-sets.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/schemas/json/layout/layout-sets.schema.v1.json", 3 | "sets":[ 4 | { 5 | "id": "default", 6 | "dataType": "default", 7 | "tasks": ["Task_1"] 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-isBefore/error-date-invalid2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should not parse an invalid date", 3 | "expression": ["compare", "2021-02-29", "isBefore", ""], 4 | "expectsFailure": "Unable to parse date \"2021-02-29\": Format was recognized, but the date/time is invalid" 5 | } 6 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "dotnet-test-explorer.testProjectPath": "**/*Tests*.csproj", 3 | "[csharp]": { 4 | "editor.defaultFormatter": "csharpier.csharpier-vscode", 5 | "editor.formatOnSave": true 6 | }, 7 | "[github-actions-workflow]": { 8 | "editor.defaultFormatter": "redhat.vscode-yaml" 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Mocks/SignClientMock.cs: -------------------------------------------------------------------------------- 1 | using Altinn.App.Core.Internal.Sign; 2 | 3 | namespace Altinn.App.Api.Tests.Mocks; 4 | 5 | public class SignClientMock : ISignClient 6 | { 7 | public Task SignDataElements(SignatureContext signatureContext) 8 | { 9 | throw new NotImplementedException(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Infrastructure/Clients/Profile/ProfileClientTests.Returns_Test_Profile.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | Activities: [ 3 | { 4 | Name: ProfileClient.GetUserProfile, 5 | IdFormat: W3C, 6 | Tags: [ 7 | { 8 | user.id: 1234 9 | } 10 | ], 11 | HasParent: false 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-error/error-expr-as-operator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail when given an expression as operator", 3 | "expression": ["compare", 5, ["if", true, "greaterThan", "else", "lowerThan"], 8], 4 | "expectsFailure": "Invalid operator (it cannot be an expression or null)" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/formats-date-with-offset.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date when only a date + offset is given", 3 | "expression": ["formatDate", "2023-01-01-08:00", "yyyy-MM-dd HH:mm:ss"], 4 | "expectsFailure": "Unable to parse date \"2023-01-01-08:00\": Unknown format" 5 | } 6 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Models/Notifications/Email/EmailRecipient.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace Altinn.App.Core.Models.Notifications.Email; 4 | 5 | /// 6 | /// Represents the recipient of an email. 7 | /// 8 | public sealed record EmailRecipient([property: JsonPropertyName("emailAddress")] string EmailAddress); 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/apps/ttd/service-tasks/ui/layout-sets.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout-sets.schema.v1.json", 3 | "sets": [ 4 | { 5 | "id": "form", 6 | "dataType": "model", 7 | "tasks": ["Task_1"] 8 | } 9 | ], 10 | "uiSettings": {} 11 | } 12 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-error/error-case-sensitive-not.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Third item should be not when given 5 items (case sensitive)", 3 | "expression": ["compare", "yes", "NOT", "equals", "no"], 4 | "expectsFailure": "Second argument must be \"not\" when providing 4 arguments in total" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/frontendSettings/null.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Looking up null", 3 | "expression": ["frontendSettings", null], 4 | "expectsFailure": "Value cannot be null. (Parameter 'key')", 5 | "frontendSettings": { 6 | "mySetting1": "foo", 7 | "mySetting2": "bar" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/invalid/wrong-function-capitalization.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FrontendSettings is not implemented", 3 | "expression": ["FrontendSettings", "mySetting1"], 4 | "expectsFailure": "Function \"FrontendSettings\" not implemented", 5 | "frontendSettings": { 6 | "mySetting1": "foo" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/CustomScopes/_snapshots/CustomScopesTests.Full_auth=SystemUser_scope=altinn-instances.read-altinn-instances.write_7_Logs.verified.txt: -------------------------------------------------------------------------------- 1 | [basic/custom-scopes] [INIT INFO] Fixture configuration updated 2 | [basic/custom-scopes] [INIT INFO] Scenario 'custom-scopes' specified but no services directory found at /App/scenario-overrides/services -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_testapps/basic/App/ui/layout-sets.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout-sets.schema.v1.json", 3 | "sets": [ 4 | { 5 | "id": "form", 6 | "dataType": "model", 7 | "tasks": ["Task_1"] 8 | } 9 | ], 10 | "uiSettings": {} 11 | } 12 | -------------------------------------------------------------------------------- /test/Altinn.App.Tests.Common/Data/Profile/User/1003.json: -------------------------------------------------------------------------------- 1 | { 2 | "UserId": 1003, 3 | "UserName": "RikForelder", 4 | "PhoneNumber": "12345678", 5 | "Email": "test@test.com", 6 | "PartyId": 510003, 7 | "Party": {}, 8 | "UserType": 0, 9 | "ProfileSettingPreference": { 10 | "Language": "nb", 11 | "doNotPromptForParty": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Models/LayoutSets.cs: -------------------------------------------------------------------------------- 1 | namespace Altinn.App.Core.Models; 2 | 3 | /// 4 | /// Layoutsets for a specific app containg one or more layoytset 5 | /// 6 | public class LayoutSets 7 | { 8 | /// 9 | /// Sets 10 | /// 11 | public required List Sets { get; set; } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/Instances/tdd/contributer-restriction/500600/cff1cb24-5bc1-4888-8e06-c634753c5144/blob/f3e04c65-aa70-40ec-84df-087cc2583402.pretest: -------------------------------------------------------------------------------- 1 | Ola Olsentrue -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/FullTests/RequiredValidator/RequiredValidatorTests.VerifyAllOk.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | IncrementalIssues: [ 3 | { 4 | Source: Required 5 | }, 6 | { 7 | Source: Altinn.App.Core.Tests.LayoutExpressions.FullTests.RequiredValidator.RequiredValidatorTests+TestValidator-Task_1-access 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /test/Altinn.App.Tests.Common/Data/Profile/User/1001.json: -------------------------------------------------------------------------------- 1 | { 2 | "UserId": 1001, 3 | "UserName": "PengelensPartner", 4 | "PhoneNumber": "12345678", 5 | "Email": "test@test.com", 6 | "PartyId": 510001, 7 | "Party": {}, 8 | "UserType": 0, 9 | "ProfileSettingPreference": { 10 | "Language": "nb", 11 | "doNotPromptForParty": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/Altinn.App.Tests.Common/Data/Profile/User/12345.json: -------------------------------------------------------------------------------- 1 | { 2 | "UserId": 12345, 3 | "UserName": "OlaNordmann", 4 | "PhoneNumber": "12345678", 5 | "Email": "test@test.com", 6 | "PartyId": 512345, 7 | "Party": {}, 8 | "UserType": 0, 9 | "ProfileSettingPreference": { 10 | "Language": "nb", 11 | "doNotPromptForParty": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/Instances/tdd/contributer-restriction/500600/fad57e80-ec2f-4dee-90ac-400fa6d7720f/blob/3b46b9ef-774c-4849-b4dd-66ef871f5b07.pretest: -------------------------------------------------------------------------------- 1 | Ola Olsentrue 2 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Mocks/Event/EventSecretCodeProviderStub.cs: -------------------------------------------------------------------------------- 1 | using Altinn.App.Core.Internal.Events; 2 | 3 | namespace Altinn.App.Api.Tests.Mocks.Event; 4 | 5 | public class EventSecretCodeProviderStub : IEventSecretCodeProvider 6 | { 7 | public Task GetSecretCode() 8 | { 9 | return Task.FromResult("42"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-e-en.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'E' as 'Sat'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "E" 7 | ], 8 | "expects": "Sat", 9 | "profileSettings": { 10 | "language": "en" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-e-nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'E' as 'lau'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "E" 7 | ], 8 | "expects": "lau", 9 | "profileSettings": { 10 | "language": "nn" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-g-en.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'G' as 'AD'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "G" 7 | ], 8 | "expects": "AD", 9 | "profileSettings": { 10 | "language": "en" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-gg-en.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'GG' as 'AD'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "GG" 7 | ], 8 | "expects": "AD", 9 | "profileSettings": { 10 | "language": "en" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/text/should-return-text-resource.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should return text resource value", 3 | "expression": ["text", "found.key"], 4 | "expects": "Hello world", 5 | "textResources": [ 6 | { 7 | "id": "found.key", 8 | "value": "Hello world" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /test/Altinn.App.Tests.Common/Data/Profile/User/1002.json: -------------------------------------------------------------------------------- 1 | { 2 | "UserId": 1002, 3 | "UserName": "GjentagendeForelder", 4 | "PhoneNumber": "12345678", 5 | "Email": "test@test.com", 6 | "PartyId": 510002, 7 | "Party": {}, 8 | "UserType": 0, 9 | "ProfileSettingPreference": { 10 | "Language": "nb", 11 | "doNotPromptForParty": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Features/Signing/Exceptions/SigneeProviderNotFoundException.cs: -------------------------------------------------------------------------------- 1 | using Altinn.App.Core.Exceptions; 2 | 3 | namespace Altinn.App.Core.Features.Signing.Exceptions; 4 | 5 | internal class SigneeProviderNotFoundException : AltinnException 6 | { 7 | public SigneeProviderNotFoundException(string message) 8 | : base(message) { } 9 | } 10 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Features/Telemetry/Signing/Telemetry.SigningCallToActionService.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace Altinn.App.Core.Features; 4 | 5 | partial class Telemetry 6 | { 7 | internal Activity? StartSendSignCallToActionActivity() => 8 | ActivitySource.StartActivity("SigningCallToActionService.SendSignCallToAction"); 9 | } 10 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/partylist/12345.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "partyId": "512345", 4 | "partyTypeName": 1, 5 | "ssn": "01017512345", 6 | "name": "Ola Nordmann", 7 | "isDeleted": false, 8 | "onlyHierarchyElementWithNoAccess": false, 9 | "person": null, 10 | "organisation": null, 11 | "childParties": null 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/roles/User_1337/party_500700/roles.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Type": "altinn", 4 | "value": "MEDL" 5 | }, 6 | { 7 | "Type": "altinn", 8 | "value": "REGNA" 9 | }, 10 | { 11 | "Type": "altinn", 12 | "value": "UTINN" 13 | }, 14 | { 15 | "Type": "altinn", 16 | "value": "UTOMR" 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/roles/User_1337/party_500800/roles.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Type": "altinn", 4 | "value": "MEDL" 5 | }, 6 | { 7 | "Type": "altinn", 8 | "value": "REGNA" 9 | }, 10 | { 11 | "Type": "altinn", 12 | "value": "UTINN" 13 | }, 14 | { 15 | "Type": "altinn", 16 | "value": "UTOMR" 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/roles/User_1337/party_500801/roles.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Type": "altinn", 4 | "value": "MEDL" 5 | }, 6 | { 7 | "Type": "altinn", 8 | "value": "REGNA" 9 | }, 10 | { 11 | "Type": "altinn", 12 | "value": "UTINN" 13 | }, 14 | { 15 | "Type": "altinn", 16 | "value": "UTOMR" 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/authorization/roles/User_1337/party_500802/roles.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Type": "altinn", 4 | "value": "MEDL" 5 | }, 6 | { 7 | "Type": "altinn", 8 | "value": "REGNA" 9 | }, 10 | { 11 | "Type": "altinn", 12 | "value": "UTINN" 13 | }, 14 | { 15 | "Type": "altinn", 16 | "value": "UTOMR" 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/compare-error/error-expr-as-not.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should fail when given an expression instead of 'not'", 3 | "expression": ["compare", 5, ["if", true, "not", "else", "not-not?"], "greaterThan", 8], 4 | "expectsFailure": "Second argument must be \"not\" when providing 4 arguments in total" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/dataModelMultiple/dataModel-type-as-expr.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dataModel lookup cannot have a dynamic data type", 3 | "expression": ["dataModel", "a.value", ["if", true, "non-default", "else", "default"]], 4 | "expectsFailure": "The data type must be a string (expressions cannot be used here)" 5 | } 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-e-nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'E' as 'lør'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "E" 7 | ], 8 | "expects": "lør", 9 | "profileSettings": { 10 | "language": "nb" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-ee-en.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EE' as 'Sat'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EE" 7 | ], 8 | "expects": "Sat", 9 | "profileSettings": { 10 | "language": "en" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-ee-nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EE' as 'lau'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EE" 7 | ], 8 | "expects": "lau", 9 | "profileSettings": { 10 | "language": "nn" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-eee-en.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EEE' as 'Sat'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EEE" 7 | ], 8 | "expects": "Sat", 9 | "profileSettings": { 10 | "language": "en" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-eee-nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EEE' as 'lau'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EEE" 7 | ], 8 | "expects": "lau", 9 | "profileSettings": { 10 | "language": "nn" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-g-nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'G' as 'e.Kr.'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "G" 7 | ], 8 | "expects": "e.Kr.", 9 | "profileSettings": { 10 | "language": "nn" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-gg-nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'GG' as 'e.Kr.'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "GG" 7 | ], 8 | "expects": "e.Kr.", 9 | "profileSettings": { 10 | "language": "nn" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-ggg-en.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'GGG' as 'AD'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "GGG" 7 | ], 8 | "expects": "AD", 9 | "profileSettings": { 10 | "language": "en" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-mmm-en.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'MMM' as 'Mar'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "MMM" 7 | ], 8 | "expects": "Mar", 9 | "profileSettings": { 10 | "language": "en" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-mmm-nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'MMM' as 'mar'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "MMM" 7 | ], 8 | "expects": "mar", 9 | "profileSettings": { 10 | "language": "nn" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Analyzers.Tests/testapp/App/ui/footer.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/footer.schema.v1.json", 3 | "footer": [ 4 | { 5 | "type": "Link", 6 | "icon": "information", 7 | "title": "general.accessibility", 8 | "target": "general.accessibility_url" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/Instances/tdd/contributer-restriction/500600/0fc98a23-fe31-4ef5-8fb9-dd3f479354ce/blob/fc121812-0336-45fb-a75c-490df3ad5109.pretest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-ee-nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EE' as 'lør'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EE" 7 | ], 8 | "expects": "lør", 9 | "profileSettings": { 10 | "language": "nb" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-eee-nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EEE' as 'lør'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EEE" 7 | ], 8 | "expects": "lør", 9 | "profileSettings": { 10 | "language": "nb" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-eeeee-en.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EEEEE' as 'S'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EEEEE" 7 | ], 8 | "expects": "S", 9 | "profileSettings": { 10 | "language": "en" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-eeeee-nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EEEEE' as 'L'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EEEEE" 7 | ], 8 | "expects": "L", 9 | "profileSettings": { 10 | "language": "nn" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-g-nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'G' as 'e.Kr.'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "G" 7 | ], 8 | "expects": "e.Kr.", 9 | "profileSettings": { 10 | "language": "nb" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-ggg-nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'GGG' as 'e.Kr.'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "GGG" 7 | ], 8 | "expects": "e.Kr.", 9 | "profileSettings": { 10 | "language": "nn" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-ggggg-en.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'GGGGG' as 'A'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "GGGGG" 7 | ], 8 | "expects": "A", 9 | "profileSettings": { 10 | "language": "en" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-mmm-nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'MMM' as 'mar'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "MMM" 7 | ], 8 | "expects": "mar", 9 | "profileSettings": { 10 | "language": "nb" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-mmmm-nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'MMMM' as 'mars'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "MMMM" 7 | ], 8 | "expects": "mars", 9 | "profileSettings": { 10 | "language": "nn" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Integration.Tests/_testapps/_shared/IEndpointConfigurator.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | 3 | namespace TestApp.Shared; 4 | 5 | /// 6 | /// Interface for configuring endpoints in the test application 7 | /// 8 | public interface IEndpointConfigurator 9 | { 10 | void ConfigureEndpoints(WebApplication app); 11 | } 12 | -------------------------------------------------------------------------------- /src/Altinn.App.Core/Configuration/FrontEndSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Altinn.App.Core.Configuration; 2 | 3 | /// 4 | /// Represents settings used by the front end react application. These settings are separate because they are 5 | /// exposed to the end user. They should never contain secrets. 6 | /// 7 | public class FrontEndSettings : Dictionary { } 8 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/Internal/Auth/AuthorizationServiceTests.GetPartyList_returns_party_list_from_AuthorizationClient.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | Activities: [ 3 | { 4 | Name: Authorization.Service.GetPartyList, 5 | IdFormat: W3C, 6 | Tags: [ 7 | { 8 | user.id: 1337 9 | } 10 | ], 11 | HasParent: false 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-eeee-nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EEEE' as 'laurdag'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EEEE" 7 | ], 8 | "expects": "laurdag", 9 | "profileSettings": { 10 | "language": "nn" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-eeeee-nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EEEEE' as 'L'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EEEEE" 7 | ], 8 | "expects": "L", 9 | "profileSettings": { 10 | "language": "nb" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-gg-nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'GG' as 'e.Kr.'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "GG" 7 | ], 8 | "expects": "e.Kr.", 9 | "profileSettings": { 10 | "language": "nb" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-ggg-nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'GGG' as 'e.Kr.'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "GGG" 7 | ], 8 | "expects": "e.Kr.", 9 | "profileSettings": { 10 | "language": "nb" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-ggggg-nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'GGGGG' as 'e.Kr.'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "GGGGG" 7 | ], 8 | "expects": "e.Kr.", 9 | "profileSettings": { 10 | "language": "nn" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-mmmm-en.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'MMMM' as 'March'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "MMMM" 7 | ], 8 | "expects": "March", 9 | "profileSettings": { 10 | "language": "en" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-mmmm-nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'MMMM' as 'mars'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "MMMM" 7 | ], 8 | "expects": "mars", 9 | "profileSettings": { 10 | "language": "nb" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/FullTests/Test2/SecondPage.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", 3 | "data": { 4 | "layout": [ 5 | { 6 | "id": "firstField", 7 | "type": "Summary", 8 | "componentRef": "gruppe1" 9 | } 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/FullTests/Test3/SecondPage.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", 3 | "data": { 4 | "layout": [ 5 | { 6 | "id": "firstField", 7 | "type": "Summary", 8 | "componentRef": "gruppe1" 9 | } 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Altinn.App.Tests.Common/Data/Register/Party/500000.json: -------------------------------------------------------------------------------- 1 | { 2 | "partyId": "500000", 3 | "partyTypeName": 2, 4 | "orgNumber": "897069650", 5 | "ssn": null, 6 | "unitType": "AS", 7 | "name": "DDG Fitness", 8 | "isDeleted": false, 9 | "onlyHierarchyElementWithNoAccess": false, 10 | "person": null, 11 | "organisation": null, 12 | "childParties": null 13 | } 14 | -------------------------------------------------------------------------------- /test/Altinn.App.Tests.Common/Data/Register/Party/501337.json: -------------------------------------------------------------------------------- 1 | { 2 | "partyId": "501337", 3 | "partyTypeName": 1, 4 | "orgNumber": null, 5 | "ssn": "01039012345", 6 | "unitType": null, 7 | "name": "Sophie Salt", 8 | "isDeleted": false, 9 | "onlyHierarchyElementWithNoAccess": false, 10 | "person": null, 11 | "organisation": null, 12 | "childParties": null 13 | } 14 | -------------------------------------------------------------------------------- /test/Altinn.App.Tests.Common/Data/Register/Party/512345.json: -------------------------------------------------------------------------------- 1 | { 2 | "partyId": "512345", 3 | "partyTypeName": 1, 4 | "orgNumber": null, 5 | "ssn": "01017512345", 6 | "unitType": null, 7 | "name": "Ola Nordmann", 8 | "isDeleted": false, 9 | "onlyHierarchyElementWithNoAccess": false, 10 | "person": null, 11 | "organisation": null, 12 | "childParties": null 13 | } 14 | -------------------------------------------------------------------------------- /test/Altinn.App.Api.Tests/Data/apps/ttd/service-tasks/ui/footer.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/footer.schema.v1.json", 3 | "footer": [ 4 | { 5 | "type": "Link", 6 | "icon": "information", 7 | "title": "general.accessibility", 8 | "target": "general.accessibility_url" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-eeee-en.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EEEE' as 'Saturday'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EEEE" 7 | ], 8 | "expects": "Saturday", 9 | "profileSettings": { 10 | "language": "en" 11 | } 12 | } -------------------------------------------------------------------------------- /test/Altinn.App.Core.Tests/LayoutExpressions/CommonTests/shared-tests/functions/formatDate/valid-uppercase-eeee-nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Should format date with format 'EEEE' as 'lørdag'", 3 | "expression": [ 4 | "formatDate", 5 | "2023-03-04T05:06:07.120Z", 6 | "EEEE" 7 | ], 8 | "expects": "lørdag", 9 | "profileSettings": { 10 | "language": "nb" 11 | } 12 | } 13 | --------------------------------------------------------------------------------