-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integration tests.
- Loading branch information
Showing
6 changed files
with
84 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,6 @@ | ||
namespace RoyalLondon.IntermediaryManagement.Api.FeatureFlagger | ||
{ | ||
public class DisabledFeatureFlagger : IFeatureFlagger | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,58 @@ | ||
namespace RoyalLondon.IntermediaryManagement.Api.FeatureFlagger | ||
{ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
[TestClass] | ||
public class FeatureFlaggerTests | ||
{ | ||
[TestMethod] | ||
public void ShouldUseBasicEnabledFlag() | ||
{ | ||
var featureFlag = new ExampleFeatureFlagger(); | ||
|
||
var isEnabled = featureFlag.IsEnabled(); | ||
|
||
Assert.IsTrue(isEnabled); | ||
} | ||
|
||
[TestMethod] | ||
public void ShouldFailDisabledFlag() | ||
{ | ||
var featureFlag = new DisabledFeatureFlagger(); | ||
|
||
var isEnabled = featureFlag.IsEnabled(); | ||
|
||
Assert.IsFalse(isEnabled); | ||
} | ||
|
||
[TestMethod] | ||
public void ShouldUseFromFlag() | ||
{ | ||
var featureFlag = new FromFeatureFlagger(); | ||
|
||
var isEnabled = featureFlag.IsEnabled(); | ||
|
||
Assert.IsTrue(isEnabled); | ||
} | ||
|
||
[TestMethod] | ||
public void ShouldUseUserFlag() | ||
{ | ||
var featureFlag = new UserFeatureFlagger(); | ||
|
||
var isEnabled = featureFlag.IsEnabled(); | ||
|
||
Assert.IsTrue(isEnabled); | ||
} | ||
|
||
[TestMethod] | ||
public void ShouldFailUserNotListedFlag() | ||
{ | ||
var featureFlag = new UnuserFeatureFlagger(); | ||
|
||
var isEnabled = featureFlag.IsEnabled(); | ||
|
||
Assert.IsFalse(isEnabled); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,6 @@ | ||
namespace RoyalLondon.IntermediaryManagement.Api.FeatureFlagger | ||
{ | ||
public class FromFeatureFlagger : IFeatureFlagger | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,7 @@ | ||
namespace RoyalLondon.IntermediaryManagement.Api.FeatureFlagger | ||
{ | ||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Unuser", Justification = "No, really")] | ||
public class UnuserFeatureFlagger : IFeatureFlagger | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,6 @@ | ||
namespace RoyalLondon.IntermediaryManagement.Api.FeatureFlagger | ||
{ | ||
public class UserFeatureFlagger : IFeatureFlagger | ||
{ | ||
} | ||
} |