public void GetConfiguration_If_Interval_Is_Null() { DataProviderSettings settings = new DataProviderSettings(); settings.Location = "C:\\Dev\\DevApps\\StatSnapShotter\\StatSnapShotter\\StatConfiguration.xml"; XMLConnection xmlConnection = new XMLConnection(settings); StatConfiguration config = new StatConfiguration(xmlConnection, null); var expected = 1; var actual = (List <StatElement>)config.GetConfiguration <List <StatElement> >(); Assert.AreEqual(expected, actual.Count); }
public void GetConfiguration_If_Path_Does_Not_Exist() { DataProviderSettings settings = new DataProviderSettings(); settings.Location = Guid.NewGuid().ToString(); XMLConnection xmlConnection = new XMLConnection(settings); StatConfiguration config = new StatConfiguration(xmlConnection, "2"); List <StatElement> expected = null; var actual = (List <StatElement>)config.GetConfiguration <List <StatElement> >(); Assert.AreEqual(expected, actual); }
public void GetConfiguration_JSON() { DataProviderSettings settings = new DataProviderSettings(); settings.Location = "C:\\Dev\\DevApps\\StatSnapShotter\\StatSnapShotter\\statConfiguration.json"; TextFileConnection fileConnection = new TextFileConnection(settings); StatConfiguration config = new StatConfiguration(fileConnection, "2"); var expected = 4; var actual = (List <StatElement>)config.GetConfiguration <List <StatElement> >(); Assert.AreEqual(expected, actual.Count); }