File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
approvaltests-tests/src/test/java/org/approvaltests
approvaltests/src/main/java/org/approvaltests/namer Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public void testTvGuide()
7575 {
7676 try (NamedEnvironment namedEnvironment = NamerFactory .asOsSpecificTest ())
7777 {
78- if (!namedEnvironment .isCurrentEnvironmentValidFor ("Windows_10" ))
78+ if (!namedEnvironment .isCurrentEnvironmentValidFor (false , "Windows_10" ))
7979 { return ; }
8080 }
8181 // begin-snippet: verifying_gui
Original file line number Diff line number Diff line change @@ -16,15 +16,22 @@ public void close()
1616 NamerFactory .getAndClearAdditionalInformation ();
1717 }
1818 public boolean isCurrentEnvironmentValidFor (String ... environment )
19+ {
20+ return isCurrentEnvironmentValidFor (true , environment );
21+ }
22+ public boolean isCurrentEnvironmentValidFor (boolean displayMessage , String ... environment )
1923 {
2024 if (Arrays .asList (environment ).contains (NamerFactory .getAdditionalInformation ()))
2125 {
2226 return true ;
2327 }
2428 else
2529 {
26- SimpleLogger .message (
27- String .format ("Not valid for current environment: \" %s\" " , NamerFactory .getAdditionalInformation ()));
30+ if (displayMessage )
31+ {
32+ SimpleLogger .message (
33+ String .format ("Not valid for current environment: \" %s\" " , NamerFactory .getAdditionalInformation ()));
34+ }
2835 return false ;
2936 }
3037 }
You can’t perform that action at this time.
0 commit comments