-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove unused logger * remove unused import * remove unused method * order dependencies alphabetically * remove unused method * add test and comment mentioning the artifact ordering * update cachix/install-nix-action * remove install url from install-nix-action
- Loading branch information
Showing
7 changed files
with
965 additions
and
937 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.fzakaria.mvn2nix.cmd; | ||
|
||
import com.fzakaria.mvn2nix.model.MavenArtifact; | ||
import com.fzakaria.mvn2nix.model.MavenNixInformation; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.net.MalformedURLException; | ||
import java.net.URL; | ||
import java.util.Map; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
class Maven2nixTest { | ||
|
||
@Test | ||
void artifactsInJsonShouldBeInAlphabeticOrder() throws MalformedURLException { | ||
var artifacts = new MavenNixInformation(Map.of( | ||
"artifact-b", new MavenArtifact(new URL("https://dummy/url/b"), "b", "sha256-b"), | ||
"artifact-a", new MavenArtifact(new URL("https://dummy/url/a"), "a", "sha256-a"))); | ||
assertEquals("{\n" + | ||
" \"dependencies\": {\n" + | ||
" \"artifact-a\": {\n" + | ||
" \"layout\": \"a\",\n" + | ||
" \"sha256\": \"sha256-a\",\n" + | ||
" \"url\": \"https://dummy/url/a\"\n" + | ||
" },\n" + | ||
" \"artifact-b\": {\n" + | ||
" \"layout\": \"b\",\n" + | ||
" \"sha256\": \"sha256-b\",\n" + | ||
" \"url\": \"https://dummy/url/b\"\n" + | ||
" }\n" + | ||
" }\n" + | ||
"}", Maven2nix.toPrettyJson(artifacts)); | ||
} | ||
|
||
} |
Oops, something went wrong.