Beispiel #1
0
            public void GetOperationCost_NonExistingProperty_Zero()
            {
                var ret = IPerCallDataProviderHelper.GetOperationCost(new DummyPerCallDataProvider()
                {
                    ConfigurationProperties = new Dictionary <string, string>()
                }, Utilities.RandomCprNumber());

                Assert.AreEqual(0m, ret);
            }
Beispiel #2
0
            public void GetOperationCost_ExistingProperty_CorrectValue(
                [Values(-1, 3, 7, 87.34)] decimal cost)
            {
                var prov = new DummyPerCallDataProvider()
                {
                    ConfigurationProperties = new Dictionary <string, string>()
                };
                var opName = "OP";

                prov.ConfigurationProperties[IPerCallDataProviderHelper.ToOperationCostPropertyName(opName)] = cost.ToString();
                var ret = IPerCallDataProviderHelper.GetOperationCost(prov, opName);

                Assert.AreEqual(cost, ret);
            }
Beispiel #3
0
 public void GetOperationCost_NullProv_Exception()
 {
     IPerCallDataProviderHelper.GetOperationCost(null, "aklskalfj");
 }