public void ShouldSerializeProperly()
{
HTTPService restService = new HTTPService
{
Type = "TestService",
Name = "TestService",
Url = "testeurl.com"
};
TCPService tcpService = new TCPService
{
Type = "TestService",
Name = "TestService",
Host = "testeurl.com",
Port = "5555"
};
var arcGISHealtChekerGroup = new ArcGISHealthCheckerGroup
{
Name = "TestProject",
HTTPServices = new List<HTTPService> { restService },
TCPServices = new List<TCPService> { tcpService }
};
var arcGISHealtCheker = new ArcGISHealthChecker
{
Groups = new List<ArcGISHealthCheckerGroup> { arcGISHealtChekerGroup }
};
var testFile = GetTempTestFileName();
ConfigurationReader.SerializeToXML(arcGISHealtCheker, testFile);
File.Exists(testFile).Should().Be.True();
File.Delete(testFile);
}