Example #1
0
        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]);
        }
Example #2
0
        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]);
        }
Example #3
0
        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]);
        }