Пример #1
0
        public void FeeTypeRepository_UpdateValue()
        {
            var repo = new FeeTypeRepository();

            var key     = "AmountExcludingFee";
            var feeType = new FeeType
            {
                Code    = "AmountExcludingFee",
                Display = "Amount Excluding Fee"
            };

            repo.UpdateValue(key, feeType);
            var containsKey = repo.ContainsKey(key);

            var value = repo.GetValue <FeeType>(key);

            Assert.IsNotNull(value);
            Assert.IsTrue(containsKey);
            Assert.AreEqual("Amount Excluding Fee", value.Display);
        }
Пример #2
0
        public void FeeTypeRepository_AddValue()
        {
            var repo = new FeeTypeRepository();

            var key     = "Fake";
            var feeType = new FeeType
            {
                Code    = "Fake",
                Display = "Fake"
            };

            repo.AddValue(key, feeType);

            var value       = repo.GetValue <FeeType>(key);
            var containsKey = repo.ContainsKey(key);

            Assert.IsNotNull(value);
            Assert.IsTrue(containsKey);
            Assert.AreEqual("Fake", value.Code);
        }