Squash and merge of version-0.1 Co-authored-by: James Wampler <james@wamp.dev> Co-committed-by: James Wampler <james@wamp.dev>
26 lines
765 B
C#
Executable File
26 lines
765 B
C#
Executable File
using NUnit.Framework;
|
|
using AppEnvironment = MicCheck.Api.Environments.Environment;
|
|
|
|
namespace MicCheck.Api.Tests.Unit.Environments;
|
|
|
|
[TestFixture]
|
|
public class EnvironmentTests
|
|
{
|
|
[Test]
|
|
public void WhenAnEnvironmentIsCreated_ThenFeatureStatesCollectionIsInitializedEmpty()
|
|
{
|
|
var environment = new AppEnvironment { Name = "Production", ApiKey = "env-key-abc" };
|
|
|
|
Assert.That(environment.FeatureStates, Is.Empty);
|
|
}
|
|
|
|
[Test]
|
|
public void WhenAnEnvironmentIsCreated_ThenNameAndApiKeyAreSet()
|
|
{
|
|
var environment = new AppEnvironment { Name = "Staging", ApiKey = "env-key-xyz" };
|
|
|
|
Assert.That(environment.Name, Is.EqualTo("Staging"));
|
|
Assert.That(environment.ApiKey, Is.EqualTo("env-key-xyz"));
|
|
}
|
|
}
|