Ejemplo n.º 1
0
        public void ValueRule02PassesEmptyValueForCostTypeNotRequiringOne()
        {
            var model = new SupplementaryDataModel
            {
                CostType = "Unit Cost",
                Value    = null
            };

            var rule = new ValueRule02();

            Assert.True(rule.Execute(model));
        }
        public void ValueRule02PassesEmptyValueForCostTypeNotRequiringOne()
        {
            var model = new SupplementaryDataModel
            {
                CostType = "Unit Cost",
                Value    = null
            };

            var rule = new ValueRule02(_messageServiceMock.Object);

            Assert.True(rule.IsValid(model));
        }
Ejemplo n.º 3
0
        public void ValueRule02CatchesValueForCostTypeNotRequiringOne()
        {
            var model = new SupplementaryDataModel
            {
                CostType = "Unit Cost",
                Value    = 19.99M
            };

            var rule = new ValueRule02();

            Assert.False(rule.Execute(model));
        }
        public void ValueRule02CatchesValueForCostTypeNotRequiringOne()
        {
            var model = new SupplementaryDataModel
            {
                CostType = "Unit Cost",
                Value    = 19.99M
            };

            var rule = new ValueRule02(_messageServiceMock.Object);

            Assert.False(rule.IsValid(model));
        }