Exemplo n.º 1
0
        public void AddRequestParameter_LastInWins()
        {
            var key    = "testKey";
            var valueA = "valueA";
            var valueB = "valueB";

            var metadata = new TransactionMetadata();

            metadata.AddRequestParameter(key, valueA);
            metadata.AddRequestParameter(key, valueB);

            var immutableTransactionMetadata = metadata.ConvertToImmutableMetadata();

            var requestParameters = immutableTransactionMetadata.RequestParameters.ToDictionary();

            var result = requestParameters[key];

            Assert.AreEqual(result, valueB);
        }