mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-07-20 20:43:47 +01:00
Fix unit tests
This commit is contained in:
@@ -43,10 +43,10 @@ namespace Tgstation.Server.Host.Core.Tests
|
||||
var mockTokenFactory = new Mock<ITokenFactory>();
|
||||
Assert.ThrowsException<ArgumentNullException>(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, null, null));
|
||||
|
||||
var mockGeneralOptions = new Mock<IOptions<GeneralConfiguration>>();
|
||||
mockGeneralOptions.SetupGet(x => x.Value).Returns(new GeneralConfiguration()).Verifiable();
|
||||
Assert.ThrowsException<ArgumentNullException>(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockGeneralOptions.Object, null));
|
||||
mockGeneralOptions.VerifyAll();
|
||||
var mockControlPanelOptions = new Mock<IOptions<ControlPanelConfiguration>>();
|
||||
mockControlPanelOptions.SetupGet(x => x.Value).Returns(new ControlPanelConfiguration()).Verifiable();
|
||||
Assert.ThrowsException<ArgumentNullException>(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockControlPanelOptions.Object, null));
|
||||
mockControlPanelOptions.VerifyAll();
|
||||
}
|
||||
|
||||
class MockSetupWizard : ISetupWizard
|
||||
|
||||
@@ -135,7 +135,6 @@ namespace Tgstation.Server.Host.Core.Tests
|
||||
"user",
|
||||
"pass",
|
||||
//general config
|
||||
"y",
|
||||
"four",
|
||||
"-12",
|
||||
"16",
|
||||
@@ -145,6 +144,9 @@ namespace Tgstation.Server.Host.Core.Tests
|
||||
"fake token",
|
||||
//logging config
|
||||
"no",
|
||||
//cp config
|
||||
"y",
|
||||
"y",
|
||||
//saved, now for second run
|
||||
//this time use defaults amap
|
||||
String.Empty,
|
||||
@@ -166,6 +168,10 @@ namespace Tgstation.Server.Host.Core.Tests
|
||||
"not actually verified because lol mocks /../!@#$%^&*()/..///.",
|
||||
"Warning",
|
||||
String.Empty,
|
||||
//cp config
|
||||
"y",
|
||||
"n",
|
||||
String.Empty,
|
||||
//third run, we already hit all the code coverage so just get through it
|
||||
String.Empty,
|
||||
nameof(DatabaseType.MariaDB),
|
||||
@@ -185,7 +191,11 @@ namespace Tgstation.Server.Host.Core.Tests
|
||||
String.Empty,
|
||||
"fake",
|
||||
"None",
|
||||
"Critical"
|
||||
"Critical",
|
||||
//cp config
|
||||
"y",
|
||||
"n",
|
||||
"http://fake.com, https://example.org",
|
||||
};
|
||||
|
||||
var inputPos = 0;
|
||||
|
||||
Reference in New Issue
Block a user