Esempio n. 1
0
        public void ValidAmsV2CallbackEndpointShouldConstructWithoutException()
        {
            // Arrange
            var mediaServicesV2EncodeOperations = Mock.Of <IMediaServicesV2EncodeOperations>();
            var mediaServicesPreset             = Mock.Of <IMediaServicesPreset>();
            var configuration = Mock.Of <IConfiguration>();

            AddMockSetting("AmsV2CallbackEndpoint", ExpectedAmsV2CallbackEndpoint.ToString(), configuration);

            // Act
            // Assert
            IMediaServicesV2Encoder mediaServicesV2Encoder = new MediaServicesV2Encoder(Logger, mediaServicesV2EncodeOperations, mediaServicesPreset, configuration);

            mediaServicesV2Encoder.ShouldNotBeNull();
        }
Esempio n. 2
0
        public async Task NullPresetNameShouldThrowArgumentException()
        {
            // Arrange
            var mediaServicesV2EncodeOperations = Mock.Of <IMediaServicesV2EncodeOperations>();
            var mediaServicesPreset             = Mock.Of <IMediaServicesPreset>();
            var configuration = Mock.Of <IConfiguration>();

            AddMockSetting("AmsV2CallbackEndpoint", ExpectedAmsV2CallbackEndpoint.ToString(), configuration);
            var mediaServicesV2Encoder = new MediaServicesV2Encoder(Logger, mediaServicesV2EncodeOperations, mediaServicesPreset, configuration);

            // Act
            // Assert
            _ = await Assert.ThrowsAsync <ArgumentNullException>(async() =>
                                                                 await mediaServicesV2Encoder.EncodeCreateAsync(
                                                                     null,
                                                                     ExpectedSourceUris,
                                                                     null,
                                                                     ExpectedOperationContext)
                                                                 .ConfigureAwait(false)).ConfigureAwait(false);
        }