-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: permit query asset json properties
- Loading branch information
Showing
23 changed files
with
493 additions
and
658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
core/common/util/src/test/java/org/eclipse/edc/util/reflection/PathItemTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation | ||
* | ||
*/ | ||
|
||
package org.eclipse.edc.util.reflection; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
public class PathItemTest { | ||
|
||
@Test | ||
void shouldParse_singleElement() { | ||
var result = PathItem.parse("test"); | ||
|
||
assertThat(result).hasSize(1).first().extracting(PathItem::toString).isEqualTo("test"); | ||
} | ||
|
||
@Test | ||
void shouldParse_singleWrappedElement() { | ||
var result = PathItem.parse("'test.data'"); | ||
|
||
assertThat(result).hasSize(1).first().extracting(PathItem::toString).isEqualTo("test.data"); | ||
} | ||
|
||
@Test | ||
void shouldParse_multipleSeparatedByDots() { | ||
var result = PathItem.parse("test.data.path"); | ||
|
||
assertThat(result).hasSize(3).extracting(PathItem::toString) | ||
.containsExactly("test", "data", "path"); | ||
} | ||
|
||
@Test | ||
void shouldParse_multipleWrappedSeparatedByDots() { | ||
var result = PathItem.parse("'test.test'.data.'path.path'"); | ||
|
||
assertThat(result).hasSize(3).extracting(PathItem::toString) | ||
.containsExactly("test.test", "data", "path.path"); | ||
} | ||
} |
Oops, something went wrong.