public void CreateArgumentsCollectionAsNewWithOneArgumentAttachedTest() { string key = "key"; int value = 10; ArgumentCollection argumentCollection = ArgumentCollection.New().WithArgument(key, value); Assert.IsTrue(argumentCollection.Any()); Assert.IsTrue(argumentCollection.HasArgument(key)); Assert.AreEqual(value, argumentCollection[key]); }
public void CreateArgumentsCollectionWithOneArgumentAddedTest() { string key = "key"; int value = 10; Argument argument = new Argument(key, value); ArgumentCollection argumentCollection = new ArgumentCollection(); argumentCollection.Add(argument); Assert.IsTrue(argumentCollection.Any()); Assert.IsTrue(argumentCollection.HasArgument(argument.Key)); Assert.AreEqual(argument.Value, argumentCollection[argument.Key]); }
public void CreateArgumentsCollectionFromDictionaryTest() { string key = "key"; int value = 10; Dictionary <string, object> arguments = new Dictionary <string, object>() { { key, value } }; ArgumentCollection argumentCollection = ArgumentCollection.FromDictionary(arguments); Assert.IsTrue(argumentCollection.Any()); Assert.IsTrue(argumentCollection.HasArgument(key)); Assert.AreEqual(value, argumentCollection[key]); }