Files
mic-check/tests/api/MicCheck.Api.Tests.Unit/Environments/EnvironmentTests.cs
James Wampler 6887d09f9c version-0.1 (#1)
Squash and merge of version-0.1

Co-authored-by: James Wampler <james@wamp.dev>
Co-committed-by: James Wampler <james@wamp.dev>
2026-07-01 13:30:07 -07:00

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"));
}
}