1
0
mirror of https://github.com/oliverbooth/VPLink synced 2024-11-14 04:35:42 +00:00
VPLink/VPLink.Tests/VirtualParadiseConfigurationTests.cs

38 lines
1.3 KiB
C#
Raw Normal View History

2023-08-26 17:47:11 +01:00
using NSubstitute;
using NSubstitute.Extensions;
using VPLink.Common.Configuration;
using VPLink.Common.Services;
namespace VPLink.Tests;
public class VirtualParadiseConfigurationTests
{
private IConfigurationService _configurationService = null!;
[SetUp]
public void Setup()
{
var configuration = Substitute.For<IVirtualParadiseConfiguration>();
configuration.Username.Returns("Admin");
configuration.Password.Returns("Password1234");
configuration.World.Returns("Blizzard");
configuration.BotName.Returns("VPLink");
_configurationService = Substitute.For<IConfigurationService>();
_configurationService.Configure().VirtualParadiseConfiguration.Returns(configuration);
}
[Test]
public void DiscordConfiguration_ShouldReturnCorrectValues_GivenDefaultConfig()
{
IVirtualParadiseConfiguration configuration = _configurationService.VirtualParadiseConfiguration;
Assert.Multiple(() =>
{
Assert.That(configuration.Username, Is.EqualTo("Admin"));
Assert.That(configuration.Password, Is.EqualTo("Password1234"));
Assert.That(configuration.World, Is.EqualTo("Blizzard"));
Assert.That(configuration.BotName, Is.EqualTo("VPLink"));
});
}
}