@@ -6,24 +6,26 @@ namespace Atata.Configuration.Json.Tests
66{
77 public class EnvironmentVariableTests : TestFixture
88 {
9- private const string VariableName = "baseurl" ;
9+ private const string Variable1Name = "url_prefix" ;
10+
11+ private const string Variable2Name = "url_suffix" ;
1012
1113 [ SetUp ]
1214 public void SetUp ( )
1315 {
14- Environment . SetEnvironmentVariable ( VariableName , null ) ;
16+ Environment . SetEnvironmentVariable ( Variable1Name , null ) ;
1517 }
1618
1719 [ Test ]
1820 public void Found ( )
1921 {
20- string variableValue = "https://example.org/" ;
21- Environment . SetEnvironmentVariable ( VariableName , variableValue , EnvironmentVariableTarget . Process ) ;
22+ Environment . SetEnvironmentVariable ( Variable1Name , "https://example.org" , EnvironmentVariableTarget . Process ) ;
23+ Environment . SetEnvironmentVariable ( Variable2Name , "test" , EnvironmentVariableTarget . Process ) ;
2224
2325 AtataContextBuilder builder = AtataContext . Configure ( )
2426 . ApplyJsonConfig ( "Configs/EnvironmentVariables" ) ;
2527
26- builder . BuildingContext . BaseUrl . Should ( ) . Be ( variableValue ) ;
28+ builder . BuildingContext . BaseUrl . Should ( ) . Be ( "https://example.org/test" ) ;
2729 }
2830
2931 [ Test ]
@@ -34,7 +36,7 @@ public void NotFound()
3436 var exception = Assert . Throws < ConfigurationException > ( ( ) =>
3537 builder . ApplyJsonConfig ( "Configs/EnvironmentVariables" ) ) ;
3638
37- exception . Message . Should ( ) . Contain ( VariableName ) ;
39+ exception . Message . Should ( ) . Contain ( Variable1Name ) ;
3840 }
3941 }
4042}
0 commit comments