예제 #1
0
        public void Unsupported_ContentType_Return_Failure()
        {
            //Arrange
            var          templateModel = CostFormTestHelper.CreateTemplateModel();
            var          contentType   = "Unsupported";
            const string production    = Constants.ProductionType.FullProduction;

            var target = new CostSectionFinder();

            //Act
            var result = target.GetCostSection(templateModel, contentType, production);

            //Assert
            result.Should().NotBeNull();
            result.Success.Should().BeFalse();
        }
예제 #2
0
        public void CGIAnimation_For_Video_Return_Success()
        {
            //Arrange
            var          templateModel = CostFormTestHelper.CreateTemplateModel();
            var          contentType   = Constants.ContentType.Video;
            const string production    = Constants.ProductionType.CgiAnimation;

            var target = new CostSectionFinder();

            //Act
            var result = target.GetCostSection(templateModel, contentType, production);

            //Assert
            result.Should().NotBeNull();
            result.Success.Should().BeTrue();
        }
예제 #3
0
        public void NotApplicableProduction_For_Digital_Return_Success()
        {
            //Arrange
            var          templateModel = CostFormTestHelper.CreateTemplateModel();
            var          contentType   = Constants.ContentType.Digital;
            const string production    = Constants.Miscellaneous.NotApplicable;

            var target = new CostSectionFinder();

            //Act
            var result = target.GetCostSection(templateModel, contentType, production);

            //Assert
            result.Should().NotBeNull();
            result.Success.Should().BeTrue();
        }
예제 #4
0
        public void Null_ProductionDetails_Throws_Argument_Error()
        {
            //Arrange
            var templateModel = CostFormTestHelper.CreateTemplateModel();
            var contentType   = Constants.ContentType.Audio;
            var production    = Constants.ProductionType.FullProduction;

            templateModel.ProductionDetails = null;

            var target = new CostSectionFinder();

            //Act
            try
            {
                target.GetCostSection(templateModel, contentType, production);
            }
            catch (ArgumentNullException)
            {
                return;
            }

            //Assert
            Assert.Fail();
        }