mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 13:38:13 -05:00
Fix some bad test parameter names (#3601)
This commit is contained in:
parent
72ebb5e66f
commit
5785905103
@ -12,8 +12,8 @@ namespace Bit.Core.Test.Services;
|
|||||||
[SutProviderCustomize]
|
[SutProviderCustomize]
|
||||||
public class LaunchDarklyFeatureServiceTests
|
public class LaunchDarklyFeatureServiceTests
|
||||||
{
|
{
|
||||||
private const string _fakeKey = "somekey";
|
private const string _fakeFeatureKey = "somekey";
|
||||||
private const string _fakeValue = "somevalue";
|
private const string _fakeSdkKey = "somesdkkey";
|
||||||
|
|
||||||
private static SutProvider<LaunchDarklyFeatureService> GetSutProvider(IGlobalSettings globalSettings)
|
private static SutProvider<LaunchDarklyFeatureService> GetSutProvider(IGlobalSettings globalSettings)
|
||||||
{
|
{
|
||||||
@ -44,46 +44,46 @@ public class LaunchDarklyFeatureServiceTests
|
|||||||
var currentContext = Substitute.For<ICurrentContext>();
|
var currentContext = Substitute.For<ICurrentContext>();
|
||||||
currentContext.UserId.Returns(Guid.NewGuid());
|
currentContext.UserId.Returns(Guid.NewGuid());
|
||||||
|
|
||||||
Assert.False(sutProvider.Sut.IsEnabled(_fakeKey, currentContext));
|
Assert.False(sutProvider.Sut.IsEnabled(_fakeFeatureKey, currentContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact(Skip = "For local development")]
|
[Fact(Skip = "For local development")]
|
||||||
public void FeatureValue_Boolean()
|
public void FeatureValue_Boolean()
|
||||||
{
|
{
|
||||||
var settings = new Settings.GlobalSettings { LaunchDarkly = { SdkKey = _fakeValue } };
|
var settings = new Settings.GlobalSettings { LaunchDarkly = { SdkKey = _fakeSdkKey } };
|
||||||
|
|
||||||
var sutProvider = GetSutProvider(settings);
|
var sutProvider = GetSutProvider(settings);
|
||||||
|
|
||||||
var currentContext = Substitute.For<ICurrentContext>();
|
var currentContext = Substitute.For<ICurrentContext>();
|
||||||
currentContext.UserId.Returns(Guid.NewGuid());
|
currentContext.UserId.Returns(Guid.NewGuid());
|
||||||
|
|
||||||
Assert.False(sutProvider.Sut.IsEnabled(_fakeKey, currentContext));
|
Assert.False(sutProvider.Sut.IsEnabled(_fakeFeatureKey, currentContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact(Skip = "For local development")]
|
[Fact(Skip = "For local development")]
|
||||||
public void FeatureValue_Int()
|
public void FeatureValue_Int()
|
||||||
{
|
{
|
||||||
var settings = new Settings.GlobalSettings { LaunchDarkly = { SdkKey = _fakeValue } };
|
var settings = new Settings.GlobalSettings { LaunchDarkly = { SdkKey = _fakeSdkKey } };
|
||||||
|
|
||||||
var sutProvider = GetSutProvider(settings);
|
var sutProvider = GetSutProvider(settings);
|
||||||
|
|
||||||
var currentContext = Substitute.For<ICurrentContext>();
|
var currentContext = Substitute.For<ICurrentContext>();
|
||||||
currentContext.UserId.Returns(Guid.NewGuid());
|
currentContext.UserId.Returns(Guid.NewGuid());
|
||||||
|
|
||||||
Assert.Equal(0, sutProvider.Sut.GetIntVariation(_fakeKey, currentContext));
|
Assert.Equal(0, sutProvider.Sut.GetIntVariation(_fakeFeatureKey, currentContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact(Skip = "For local development")]
|
[Fact(Skip = "For local development")]
|
||||||
public void FeatureValue_String()
|
public void FeatureValue_String()
|
||||||
{
|
{
|
||||||
var settings = new Settings.GlobalSettings { LaunchDarkly = { SdkKey = _fakeValue } };
|
var settings = new Settings.GlobalSettings { LaunchDarkly = { SdkKey = _fakeSdkKey } };
|
||||||
|
|
||||||
var sutProvider = GetSutProvider(settings);
|
var sutProvider = GetSutProvider(settings);
|
||||||
|
|
||||||
var currentContext = Substitute.For<ICurrentContext>();
|
var currentContext = Substitute.For<ICurrentContext>();
|
||||||
currentContext.UserId.Returns(Guid.NewGuid());
|
currentContext.UserId.Returns(Guid.NewGuid());
|
||||||
|
|
||||||
Assert.Null(sutProvider.Sut.GetStringVariation(_fakeKey, currentContext));
|
Assert.Null(sutProvider.Sut.GetStringVariation(_fakeFeatureKey, currentContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact(Skip = "For local development")]
|
[Fact(Skip = "For local development")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user