mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 14:06:41 +01:00
Add a basic ControlPanel test to reference it for coverage
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
using System.Collections.Generic;
|
||||
using TGServiceInterface;
|
||||
using TGServiceInterface.Components;
|
||||
|
||||
namespace TGControlPanel.Tests
|
||||
{
|
||||
/// <summary>
|
||||
/// Tests for <see cref="InstanceSelector"/>
|
||||
/// </summary>
|
||||
[TestClass]
|
||||
public class TestInstanceSelector
|
||||
{
|
||||
/// <summary>
|
||||
/// Test that an <see cref="InstanceSelector"/> can be created without issue
|
||||
/// </summary>
|
||||
[TestMethod]
|
||||
public void TestInstatiation()
|
||||
{
|
||||
var mockLanding = new Mock<ITGLanding>();
|
||||
mockLanding.Setup(x => x.ListInstances()).Returns(new List<InstanceMetadata>());
|
||||
var mockInter = new Mock<IInterface>();
|
||||
mockInter.Setup(x => x.GetComponent<ITGLanding>()).Returns(mockLanding.Object);
|
||||
|
||||
new InstanceSelector(mockInter.Object).Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,11 +57,13 @@
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CommandLine\Commands\Repository\RepositoryCommandTest.cs" />
|
||||
<Compile Include="CommandLine\Commands\Repository\TestRepoSetPushTestmergeCommitsCommand.cs" />
|
||||
<Compile Include="CommandLine\Commands\Repository\TestRepoStatusCommand.cs" />
|
||||
<Compile Include="ControlPanel\TestInstanceSelector.cs" />
|
||||
<Compile Include="Interface\TestHelpers.cs" />
|
||||
<Compile Include="Interface\TestInterface.cs" />
|
||||
<Compile Include="OutputProcOverriderTest.cs" />
|
||||
|
||||
Reference in New Issue
Block a user