@@ -50,7 +50,7 @@ public void TestInitForCosmosDB()
5050 [ TestMethod ]
5151 public void TestAddEntity ( )
5252 {
53- string [ ] initArgs = { "init" , "-c" , _testRuntimeConfig , "--host-mode" , "development " , "--database-type" , "mssql" , "--connection-string" , "localhost:5000" , "--authenticate-devmode-requests" , "false" } ;
53+ string [ ] initArgs = { "init" , "-c" , _testRuntimeConfig , "--host-mode" , "Development " , "--database-type" , "mssql" , "--connection-string" , "localhost:5000" , "--authenticate-devmode-requests" , "false" } ;
5454 Program . Main ( initArgs ) ;
5555
5656 RuntimeConfig ? runtimeConfig = TryGetRuntimeConfig ( _testRuntimeConfig ) ;
@@ -80,35 +80,6 @@ public void TestAddEntity()
8080 Assert . AreEqual ( WILDCARD , ( ( JsonElement ) entity . Permissions [ 0 ] . Operations [ 0 ] ) . GetString ( ) ) ;
8181 }
8282
83- /// <summary>
84- /// Test to verify that --host-mode is case insensitive.
85- /// Short forms are not supported.
86- /// </summary>
87- [ DataTestMethod ]
88- [ DataRow ( "production" , HostModeType . Production , true ) ]
89- [ DataRow ( "Production" , HostModeType . Production , true ) ]
90- [ DataRow ( "development" , HostModeType . Development , true ) ]
91- [ DataRow ( "Development" , HostModeType . Development , true ) ]
92- [ DataRow ( "developer" , HostModeType . Development , false ) ]
93- [ DataRow ( "prod" , HostModeType . Production , false ) ]
94- public void EnsureHostModeEnumIsCaseInsensitive ( string hostMode , HostModeType hostModeEnumType , bool expectSuccess )
95- {
96- string [ ] initArgs = { "init" , "-c" , _testRuntimeConfig , "--host-mode" , hostMode , "--database-type" , "mssql" , "--connection-string" , "localhost:5000" } ;
97- Program . Main ( initArgs ) ;
98-
99- RuntimeConfig ? runtimeConfig = TryGetRuntimeConfig ( _testRuntimeConfig ) ;
100- if ( expectSuccess )
101- {
102- Assert . IsNotNull ( runtimeConfig ) ;
103- runtimeConfig . DetermineGlobalSettings ( ) ;
104- Assert . AreEqual ( hostModeEnumType , runtimeConfig . HostGlobalSettings . Mode ) ;
105- }
106- else
107- {
108- Assert . IsNull ( runtimeConfig ) ;
109- }
110- }
111-
11283 /// <summary>
11384 /// Test to verify adding a new Entity without IEnumerable options.
11485 /// </summary>
@@ -122,7 +93,6 @@ public void TestAddEntityWithoutIEnumerables()
12293
12394 Assert . IsNotNull ( runtimeConfig ) ;
12495 Assert . AreEqual ( 0 , runtimeConfig . Entities . Count ( ) ) ; // No entities
125- Assert . AreEqual ( HostModeType . Production , runtimeConfig . HostGlobalSettings . Mode ) ;
12696
12797 string [ ] addArgs = { "add" , "book" , "-c" , _testRuntimeConfig , "--source" , "s001.book" , "--permissions" , "anonymous:*" } ;
12898 Program . Main ( addArgs ) ;
0 commit comments