Example #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();
        }
Example #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();
        }
Example #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();
        }
Example #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();
        }