-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from gregv12/develop
Release 0.2.0
- Loading branch information
Showing
13 changed files
with
416 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "maven" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
target-branch: "develop" |
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
32 changes: 32 additions & 0 deletions
32
annotation-processor/src/test/java/com/fluxtion/extension/csvcompiler/SingleParserTest.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,32 @@ | ||
package com.fluxtion.extension.csvcompiler; | ||
|
||
import com.fluxtion.extension.csvcompiler.annotations.CsvMarshaller; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class SingleParserTest { | ||
|
||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@CsvMarshaller | ||
public static class Person { | ||
private String name; | ||
private int age; | ||
} | ||
|
||
@Test | ||
public void testSingleParse() { | ||
SingleRowMarshaller<Person> parser = RowMarshaller.parser(Person.class); | ||
//headers - no output | ||
parser.parse("name,age\n"); | ||
|
||
Assertions.assertEquals(new Person("Jane", 56), parser.parse("Jane,56\n")); | ||
Assertions.assertEquals(new Person("Isiah", 12), parser.parse("Isiah,12\n")); | ||
Assertions.assertEquals(new Person("Sky", 42), parser.parse("Sky,42\n")); | ||
} | ||
} |
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
26 changes: 26 additions & 0 deletions
26
example/src/main/java/com/fluxtion/extension/csvcompiler/example2/SingleMessageParse.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,26 @@ | ||
package com.fluxtion.extension.csvcompiler.example2; | ||
|
||
import com.fluxtion.extension.csvcompiler.RowMarshaller; | ||
import com.fluxtion.extension.csvcompiler.SingleRowMarshaller; | ||
import com.fluxtion.extension.csvcompiler.annotations.CsvMarshaller; | ||
import lombok.Data; | ||
|
||
public class SingleMessageParse { | ||
|
||
@Data | ||
@CsvMarshaller | ||
public static class Person { | ||
private String name; | ||
private int age; | ||
} | ||
|
||
public static void main(String[] args) { | ||
SingleRowMarshaller<Person> parser = RowMarshaller.parser(Person.class); | ||
//headers - no output | ||
parser.parse("name,age\n"); | ||
|
||
System.out.println("parsed:" + parser.parse("Jane,56\n")); | ||
System.out.println("parsed:" + parser.parse("Isiah,12\n")); | ||
System.out.println("parsed:" + parser.parse("Sky,42\n")); | ||
} | ||
} |
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
Oops, something went wrong.