@@ -1155,14 +1155,14 @@ public async Task GetMultipleAsync_WithArguments_ThrowsException()
1155
1155
1156
1156
await Assert . ThrowsAsync < NotSupportedException > ( Act ) ;
1157
1157
}
1158
-
1158
+
1159
1159
[ Fact ]
1160
1160
public async Task IsFeatureFlagEnabled_WhenKeyIsEmptyOrNull_ReturnsDefaultValue ( )
1161
1161
{
1162
1162
// Arrange
1163
1163
var featureFlagKey = string . Empty ;
1164
1164
var defaultFlagValue = false ;
1165
-
1165
+
1166
1166
var appConfigProvider = new AppConfigProvider ( Substitute . For < IDateTimeWrapper > ( ) ) ;
1167
1167
1168
1168
// Act
@@ -1189,7 +1189,7 @@ public async Task IsFeatureFlagEnabled_WhenKeyIsEmptyOrNull_ReturnsSpecifiedDefa
1189
1189
// Assert
1190
1190
Assert . Equal ( flagValue , defaultFlagValue ) ;
1191
1191
}
1192
-
1192
+
1193
1193
[ Fact ]
1194
1194
public async Task IsFeatureFlagEnabled_WhenFlagIsEnabled_ReturnsTrue ( )
1195
1195
{
@@ -1217,7 +1217,7 @@ public async Task IsFeatureFlagEnabled_WhenFlagIsEnabled_ReturnsTrue()
1217
1217
attributeTwo = 20
1218
1218
} ,
1219
1219
} ;
1220
-
1220
+
1221
1221
var lastConfigStr = JsonSerializer . Serialize ( lastConfig ) ;
1222
1222
var transformedValue = JsonSerializer . Deserialize < JsonObject > ( lastConfigStr ) ;
1223
1223
@@ -1252,7 +1252,7 @@ public async Task IsFeatureFlagEnabled_WhenFlagIsEnabled_ReturnsTrue()
1252
1252
// Assert
1253
1253
Assert . Equal ( currentConfig , lastConfig . FeatureFlagOne . enabled ) ;
1254
1254
}
1255
-
1255
+
1256
1256
[ Fact ]
1257
1257
public async Task IsFeatureFlagEnabled_WhenFlagIsDisabled_ReturnsFalse ( )
1258
1258
{
@@ -1280,7 +1280,7 @@ public async Task IsFeatureFlagEnabled_WhenFlagIsDisabled_ReturnsFalse()
1280
1280
attributeTwo = 20
1281
1281
} ,
1282
1282
} ;
1283
-
1283
+
1284
1284
var lastConfigStr = JsonSerializer . Serialize ( lastConfig ) ;
1285
1285
var transformedValue = JsonSerializer . Deserialize < JsonObject > ( lastConfigStr ) ;
1286
1286
@@ -1343,7 +1343,7 @@ public async Task GetFeatureFlagAttribute_WhenHasAttribute_ReturnsAttributeValue
1343
1343
attributeTwo = 20
1344
1344
} ,
1345
1345
} ;
1346
-
1346
+
1347
1347
var lastConfigStr = JsonSerializer . Serialize ( lastConfig ) ;
1348
1348
var transformedValue = JsonSerializer . Deserialize < JsonObject > ( lastConfigStr ) ;
1349
1349
@@ -1373,14 +1373,16 @@ public async Task GetFeatureFlagAttribute_WhenHasAttribute_ReturnsAttributeValue
1373
1373
. WithConfigProfile ( configProfileId ) ;
1374
1374
1375
1375
// Act
1376
- var attributeValue1 = await appConfigProvider . GetFeatureFlagAttributeValueAsync < string > ( "FeatureFlagOne" , "attributeOne" ) . ConfigureAwait ( false ) ;
1377
- var attributeValue2 = await appConfigProvider . GetFeatureFlagAttributeValueAsync < int > ( "FeatureFlagOne" , "attributeTwo" ) . ConfigureAwait ( false ) ;
1376
+ var attributeValue1 = await appConfigProvider
1377
+ . GetFeatureFlagAttributeValueAsync < string > ( "FeatureFlagOne" , "attributeOne" ) . ConfigureAwait ( false ) ;
1378
+ var attributeValue2 = await appConfigProvider
1379
+ . GetFeatureFlagAttributeValueAsync < int > ( "FeatureFlagOne" , "attributeTwo" ) . ConfigureAwait ( false ) ;
1378
1380
1379
1381
// Assert
1380
1382
Assert . Equal ( attributeValue1 , lastConfig . FeatureFlagOne . attributeOne ) ;
1381
1383
Assert . Equal ( attributeValue2 , lastConfig . FeatureFlagOne . attributeTwo ) ;
1382
1384
}
1383
-
1385
+
1384
1386
[ Fact ]
1385
1387
public async Task GetFeatureFlagAttribute_WhenAttributeDoesNotExist_ReturnsNull ( )
1386
1388
{
@@ -1408,7 +1410,7 @@ public async Task GetFeatureFlagAttribute_WhenAttributeDoesNotExist_ReturnsNull(
1408
1410
attributeTwo = 20
1409
1411
} ,
1410
1412
} ;
1411
-
1413
+
1412
1414
var lastConfigStr = JsonSerializer . Serialize ( lastConfig ) ;
1413
1415
var transformedValue = JsonSerializer . Deserialize < JsonObject > ( lastConfigStr ) ;
1414
1416
@@ -1438,12 +1440,13 @@ public async Task GetFeatureFlagAttribute_WhenAttributeDoesNotExist_ReturnsNull(
1438
1440
. WithConfigProfile ( configProfileId ) ;
1439
1441
1440
1442
// Act
1441
- var attributeValue1 = await appConfigProvider . GetFeatureFlagAttributeValueAsync < string > ( "FeatureFlagOne" , "INVALID" ) . ConfigureAwait ( false ) ;
1443
+ var attributeValue1 = await appConfigProvider
1444
+ . GetFeatureFlagAttributeValueAsync < string > ( "FeatureFlagOne" , "INVALID" ) . ConfigureAwait ( false ) ;
1442
1445
1443
1446
// Assert
1444
1447
Assert . Null ( attributeValue1 ) ;
1445
1448
}
1446
-
1449
+
1447
1450
[ Fact ]
1448
1451
public async Task GetFeatureFlagAttribute_WhenAttributeDoesNotExist_ReturnsSpecifiedDefaultValue ( )
1449
1452
{
@@ -1472,7 +1475,7 @@ public async Task GetFeatureFlagAttribute_WhenAttributeDoesNotExist_ReturnsSpeci
1472
1475
attributeTwo = 20
1473
1476
} ,
1474
1477
} ;
1475
-
1478
+
1476
1479
var lastConfigStr = JsonSerializer . Serialize ( lastConfig ) ;
1477
1480
var transformedValue = JsonSerializer . Deserialize < JsonObject > ( lastConfigStr ) ;
1478
1481
@@ -1502,7 +1505,8 @@ public async Task GetFeatureFlagAttribute_WhenAttributeDoesNotExist_ReturnsSpeci
1502
1505
. WithConfigProfile ( configProfileId ) ;
1503
1506
1504
1507
// Act
1505
- var attributeValue1 = await appConfigProvider . GetFeatureFlagAttributeValueAsync < string > ( "FeatureFlagOne" , "INVALID" , defaultAttributeVale ) . ConfigureAwait ( false ) ;
1508
+ var attributeValue1 = await appConfigProvider
1509
+ . GetFeatureFlagAttributeValueAsync ( "FeatureFlagOne" , "INVALID" , defaultAttributeVale ) . ConfigureAwait ( false ) ;
1506
1510
1507
1511
// Assert
1508
1512
Assert . Equal ( attributeValue1 , defaultAttributeVale ) ;
0 commit comments