33 lines
646 B
C#
33 lines
646 B
C#
using Endpoint;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
namespace EndpointTest
|
|
{
|
|
/// <summary>
|
|
/// Tests for WindowsServiceEndpoint
|
|
/// </summary>
|
|
[TestClass]
|
|
public class WindowsServiceEndpointTest
|
|
{
|
|
/// <summary>
|
|
/// Use a service that should always be running on localhost
|
|
/// </summary>
|
|
private const string SERVICENAME = "Windows Time";
|
|
|
|
/// <summary>
|
|
/// Runs GetStatus
|
|
/// </summary>
|
|
[TestMethod]
|
|
public void GetStatusTest()
|
|
{
|
|
var target = new WindowsServiceEndpoint
|
|
{
|
|
ServiceName = SERVICENAME
|
|
};
|
|
|
|
var status = target.GetStatus();
|
|
Assert.AreEqual(Status.Up, status);
|
|
}
|
|
}
|
|
}
|