File tree Expand file tree Collapse file tree 12 files changed +27
-19
lines changed
main/java/gov/cms/qpp/conversion/api/helper
test/java/gov/cms/qpp/conversion/api/helper Expand file tree Collapse file tree 12 files changed +27
-19
lines changed Original file line number Diff line number Diff line change 6
6
<parent >
7
7
<groupId >gov.cms.qpp.conversion</groupId >
8
8
<artifactId >qpp-conversion-tool-parent</artifactId >
9
- <version >0.33 -SNAPSHOT</version >
9
+ <version >0.34 -SNAPSHOT</version >
10
10
<relativePath >../</relativePath >
11
11
</parent >
12
12
Original file line number Diff line number Diff line change 6
6
<parent >
7
7
<groupId >gov.cms.qpp.conversion</groupId >
8
8
<artifactId >qpp-conversion-tool-parent</artifactId >
9
- <version >0.33 -SNAPSHOT</version >
9
+ <version >0.34 -SNAPSHOT</version >
10
10
<relativePath >../</relativePath >
11
11
</parent >
12
12
Original file line number Diff line number Diff line change 6
6
<parent >
7
7
<groupId >gov.cms.qpp.conversion</groupId >
8
8
<artifactId >qpp-conversion-tool-parent</artifactId >
9
- <version >0.33 -SNAPSHOT</version >
9
+ <version >0.34 -SNAPSHOT</version >
10
10
<relativePath >../</relativePath >
11
11
</parent >
12
12
Original file line number Diff line number Diff line change 6
6
<parent >
7
7
<groupId >gov.cms.qpp.conversion</groupId >
8
8
<artifactId >qpp-conversion-tool-parent</artifactId >
9
- <version >0.33 -SNAPSHOT</version >
9
+ <version >0.34 -SNAPSHOT</version >
10
10
<relativePath >../</relativePath >
11
11
</parent >
12
12
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " qpp-conversion-frontend" ,
3
- "version" : " 0.32 " ,
3
+ "version" : " 0.34 " ,
4
4
"license" : " MIT" ,
5
5
"scripts" : {
6
6
"ng" : " ng" ,
Original file line number Diff line number Diff line change 5
5
<parent >
6
6
<artifactId >qpp-conversion-tool-parent</artifactId >
7
7
<groupId >gov.cms.qpp.conversion</groupId >
8
- <version >0.33 -SNAPSHOT</version >
8
+ <version >0.34 -SNAPSHOT</version >
9
9
</parent >
10
10
<modelVersion >4.0.0</modelVersion >
11
11
Original file line number Diff line number Diff line change 6
6
<groupId >gov.cms.qpp.conversion</groupId >
7
7
<artifactId >qpp-conversion-tool-parent</artifactId >
8
8
<packaging >pom</packaging >
9
- <version >0.33 -SNAPSHOT</version >
9
+ <version >0.34 -SNAPSHOT</version >
10
10
<name >QPP Conversion Tool</name >
11
11
12
12
<properties >
Original file line number Diff line number Diff line change 6
6
<parent >
7
7
<groupId >gov.cms.qpp.conversion</groupId >
8
8
<artifactId >qpp-conversion-tool-parent</artifactId >
9
- <version >0.33 -SNAPSHOT</version >
9
+ <version >0.34 -SNAPSHOT</version >
10
10
<relativePath >../</relativePath >
11
11
</parent >
12
12
Original file line number Diff line number Diff line change @@ -27,16 +27,18 @@ private MetadataHelper() {
27
27
* @return
28
28
*/
29
29
public static Metadata generateMetadata (Node node , Outcome outcome ) {
30
- Objects .requireNonNull (node , "node" );
31
30
Objects .requireNonNull (outcome , "outcome" );
32
31
33
32
Metadata metadata = new Metadata ();
34
33
35
- metadata .setApm (findApm (node ));
36
- metadata .setTin (findTin (node ));
37
- metadata .setNpi (findNpi (node ));
38
- metadata .setCpc (isCpc (node ));
39
- metadata .setCpcProcessed (false );
34
+ if (node != null ) {
35
+ metadata .setApm (findApm (node ));
36
+ metadata .setTin (findTin (node ));
37
+ metadata .setNpi (findNpi (node ));
38
+ metadata .setCpc (isCpc (node ));
39
+ metadata .setCpcProcessed (false );
40
+ }
41
+
40
42
outcome .setStatus (metadata );
41
43
42
44
return metadata ;
Original file line number Diff line number Diff line change @@ -16,9 +16,15 @@ class MetadataHelperTest {
16
16
private static final String MOCK_STRING = "some random mock value" ;
17
17
18
18
@ Test
19
- void testGenerateMetadataForNullNodeThrowsNullPointerException () {
20
- Assertions .assertThrows (NullPointerException .class , () ->
21
- MetadataHelper .generateMetadata (null , MetadataHelper .Outcome .SUCCESS ));
19
+ void testGenerateMetadataForNullNodeReturnsSkinnyMetadata () {
20
+ MetadataHelper .Outcome outcome = MetadataHelper .Outcome .VALIDATION_ERROR ;
21
+ Metadata comparison = new Metadata ();
22
+ comparison .setOverallStatus (false );
23
+ comparison .setConversionStatus (true );
24
+ comparison .setValidationStatus (false );
25
+
26
+ Metadata metadata = MetadataHelper .generateMetadata (null , outcome );
27
+ assertThat (metadata ).isEqualTo (comparison );
22
28
}
23
29
24
30
@ Test
You can’t perform that action at this time.
0 commit comments