コード例 #1
0
        public void CostTypeRule01PassesValidCostTypes()
        {
            var model = new SupplementaryDataModel
            {
                CostType = "Grant"
            };
            var rule = new CostTypeRule01(_messageServiceMock.Object);

            Assert.True(rule.IsValid(model));
        }
コード例 #2
0
        public void CostTypeRule01CatchesCostTypesNotInValidList()
        {
            var model = new SupplementaryDataModel
            {
                CostType = "I am not valid"
            };
            var rule = new CostTypeRule01(_messageServiceMock.Object);

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