public void GetConfigurationValues_NullConnectionServer_Failure() { List <ConfigurationValue> oValues; var res = ConfigurationValue.GetConfigurationValues(null, out oValues, 1, 20, "query=(FullName startswith System)"); Assert.IsFalse(res.Success, "Static method to fetch configuration values did not fail with null ConnectionServer"); }
public void GetConfigurationValues_EmptyQuery_Success() { List <ConfigurationValue> oValues; var res = ConfigurationValue.GetConfigurationValues(_mockServer, out oValues); Assert.IsTrue(res.Success, "Static method to fetch configuration values failed with empty query construction:" + res); }
public void GetConfigurationValues_ValidQuery_Success() { List <ConfigurationValue> oValues; var res = ConfigurationValue.GetConfigurationValues(_mockServer, out oValues, 1, 20, "query=(FullName startswith System)"); Assert.IsTrue(res.Success, "Static method to fetch configuration values failed with query construction:" + res); }
public void ConfigurationValue_Test() { _errorString = ""; List <ConfigurationValue> oValues; var res = ConfigurationValue.GetConfigurationValues(_connectionServer, out oValues, 1, 10); Assert.IsTrue(res.Success, "Failed to fetch configuration value:" + res); Assert.IsTrue(string.IsNullOrEmpty(_errorString), "Error parsing Json for configuration value:" + _errorString); }
public void StaticCallFailure_GetConfigurationValues() { List <ConfigurationValue> oValues; var res = ConfigurationValue.GetConfigurationValues(_connectionServer, out oValues, 1, 20, "query=(FullName startswith System)"); Assert.IsTrue(res.Success, "Static method to fetch configuration values failed with query construction:" + res); res = ConfigurationValue.GetConfigurationValues(_connectionServer, out oValues, 1, 20, "", "query=(bogus)"); Assert.IsFalse(res.Success, "Static method to fetch configuration values did not fail with invalid query construction"); }
public void StaticCallFailure_GetConfigurationValue() { ConfigurationValue oNewValue; List <ConfigurationValue> oValues; WebCallResult res = ConfigurationValue.GetConfigurationValues(_connectionServer, out oValues); Assert.IsTrue(res.Success, "Failed to fetch list of all configuraiton values"); Assert.IsTrue(oValues.Count > 0, "No configuration values returned from system fetch"); string strFullName = oValues[0].FullName; res = ConfigurationValue.GetConfigurationValue(out oNewValue, _connectionServer, "bogus"); Assert.IsFalse(res.Success, "Call to GetConfigurationValue static method did not fail with bogus key name"); res = ConfigurationValue.GetConfigurationValue(out oNewValue, _connectionServer, strFullName); Assert.IsTrue(res.Success, "Static method to fetch configuration value failed for valid key name:" + res); }
public void FetchTests() { List <ConfigurationValue> oValues; WebCallResult res = ConfigurationValue.GetConfigurationValues(_connectionServer, out oValues); Assert.IsTrue(res.Success, "Failed to fetch list of all configuraiton values"); Assert.IsTrue(oValues.Count > 0, "No configuration values returned from system fetch"); string strFullName = oValues[0].FullName; try { ConfigurationValue oValue = new ConfigurationValue(_connectionServer, strFullName); Console.WriteLine(oValue.ToString()); Console.WriteLine(oValue.DumpAllProps()); } catch (Exception ex) { Assert.IsTrue(false, "Failed to construct Configuraiton value from full name:" + ex); } }