public void CreateVideoParamThrowAggregateExceptionTest()
        {
            //Arrange
            var factory = new MultimediaAdjusterParamFactory();

            //Act & Assert
            var exception0 = ExceptionAssert.Throws <AggregateException>(() => factory.CreateVideoParam(_videoMetadata0.Object));
            var exception2 = ExceptionAssert.Throws <AggregateException>(() => factory.CreateVideoParam(_videoMetadata2.Object));

            ExceptionAssert.NotThrows <AggregateException>(() => factory.CreateVideoParam(_videoMetadata1.Object));

            //Assert
            Assert.IsTrue(exception0.InnerExceptions.OfType <VideoFormatException>().Any(p => p.ParamType == ParamType.VideoStreamCount));
            Assert.IsTrue(exception2.InnerExceptions.OfType <VideoFormatException>().Any(p => p.ParamType == ParamType.VideoStreamCount));
        }
        public void CreateVideoParamGopIsNullTest()
        {
            //Arrange
            var factory = new MultimediaAdjusterParamFactory();

            _videoMetadata.Setup(p => p.VideoFormatSettingsGOP).Returns((string)null);

            //Act
            var videoParam = factory.CreateVideoParam(_videoMetadata.Object);

            //Assert
            Assert.AreEqual(0, videoParam.KeyFrameRate);
        }
        public void CreateVideoParamTest()
        {
            //Arrange
            var factory = new MultimediaAdjusterParamFactory();

            //Act
            var videoAdjusterParam = factory.CreateVideoParam(_videoMetadata.Object);

            //Assert
            Assert.AreEqual(_videoMetadata.Object.GeneralFormat, videoAdjusterParam.MediaContainer);
            Assert.AreEqual(_videoMetadata.Object.VideoFormat, videoAdjusterParam.VideoCodec);
            Assert.AreEqual(_videoMetadata.Object.VideoFormatProfile, videoAdjusterParam.VideoProfile);
            Assert.AreEqual(_videoMetadata.Object.VideoBitRate, videoAdjusterParam.VideoBitrate);
            Assert.AreEqual(_videoMetadata.Object.VideoFrameRate, videoAdjusterParam.FrameRate);
            Assert.AreEqual(_videoMetadata.Object.VideoFrameRateMode, videoAdjusterParam.FrameRateMode);
            Assert.AreEqual(KeyFrameRate, videoAdjusterParam.KeyFrameRate);
            Assert.AreEqual(_videoMetadata.Object.VideoRotation, videoAdjusterParam.VideoRotation);
        }