public void ConstructorShouldThrowExceptionIfKeyValueIsNull() { Assert.ThrowsException <ArgumentNullException>( () => { var envvariable = new DataCollectionEnvironmentVariable(default(KeyValuePair <string, string>), null); }); }
public void FirstDataCollectorThatRequestedShouldReturnTheFirstdataCollectorRequestingThatEnvVariable() { var envValPair = new KeyValuePair <string, string>("key", "value"); var envvariable = new DataCollectionEnvironmentVariable(envValPair, "datacollector"); envvariable.AddRequestingDataCollector("datacollector1"); Assert.AreEqual("datacollector", envvariable.FirstDataCollectorThatRequested); }
public void FirstDataCollectorThatRequestedShouldSetNameAndValue() { var envValPair = new KeyValuePair <string, string>("key", "value"); var envvariable = new DataCollectionEnvironmentVariable(envValPair, "datacollector"); envvariable.AddRequestingDataCollector("datacollector1"); Assert.AreEqual("key", envvariable.Name); Assert.AreEqual("value", envvariable.Value); }