Add quick tests to verify that observer client is successfully sending request to support observer API
This commit is contained in:
Родитель
005dffd1f8
Коммит
1a36f2f170
|
@ -0,0 +1,42 @@
|
|||
using Diagnostics.DataProviders;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Xunit;
|
||||
|
||||
namespace Diagnostics.Tests.DataProviderTests
|
||||
{
|
||||
public class SupportObserverTests
|
||||
{
|
||||
private SupportObserverDataProvider _dataProvider;
|
||||
public SupportObserverTests()
|
||||
{
|
||||
//setup
|
||||
var configurationFactory = new MockDataProviderConfigurationFactory();
|
||||
var configuration = configurationFactory.LoadConfigurations();
|
||||
_dataProvider = new SupportObserverDataProvider(null, configuration.SupportObserverConfiguration);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetHostnamesTest()
|
||||
{
|
||||
var hostnames = _dataProvider.GetSiteHostNames("realforsikring").Result;
|
||||
Assert.Equal(3, hostnames.Count());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetRuntimeSlotMap()
|
||||
{
|
||||
var runtimeSlotMap = _dataProvider.GetRuntimeSiteSlotMap("waws-prod-bn1-71717c45", "thor-api").Result;
|
||||
Assert.True(runtimeSlotMap.ContainsKey("Production"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetSiteObject()
|
||||
{
|
||||
var siteObject = _dataProvider.GetSite("thor-api").Result;
|
||||
Assert.Equal(siteObject.SiteName, "thor-api");
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче