Search in sources :

Example 1 with ContainerType

use of com.aws.iot.edgeconnectorforkvs.videorecorder.model.ContainerType in project aws-iot-greengrass-edge-connector-for-kinesis-video-stream by awslabs.

the class RecorderBranchBaseUnitTest method getMuxerTest_getMuxerByInvalidType_throwException.

@Test
public void getMuxerTest_getMuxerByInvalidType_throwException() {
    RecorderCapability cap = RecorderCapability.VIDEO_AUDIO;
    ContainerType type = ContainerType.UNSUPPORTED;
    RecorderBranchTest testBranch = new RecorderBranchTest(cap);
    Assertions.assertThrows(IllegalArgumentException.class, () -> testBranch.getMuxer(type, true));
}
Also used : RecorderCapability(com.aws.iot.edgeconnectorforkvs.videorecorder.model.RecorderCapability) ContainerType(com.aws.iot.edgeconnectorforkvs.videorecorder.model.ContainerType) Test(org.junit.jupiter.api.Test)

Example 2 with ContainerType

use of com.aws.iot.edgeconnectorforkvs.videorecorder.model.ContainerType in project aws-iot-greengrass-edge-connector-for-kinesis-video-stream by awslabs.

the class RecorderBranchBaseUnitTest method getExtensionTest_getExtensionByType_mkv.

@Test
public void getExtensionTest_getExtensionByType_mkv() {
    RecorderCapability cap = RecorderCapability.VIDEO_AUDIO;
    ContainerType type = ContainerType.MATROSKA;
    RecorderBranchTest testBranch = new RecorderBranchTest(cap);
    Assertions.assertEquals("mkv", testBranch.getExtension(type));
}
Also used : RecorderCapability(com.aws.iot.edgeconnectorforkvs.videorecorder.model.RecorderCapability) ContainerType(com.aws.iot.edgeconnectorforkvs.videorecorder.model.ContainerType) Test(org.junit.jupiter.api.Test)

Example 3 with ContainerType

use of com.aws.iot.edgeconnectorforkvs.videorecorder.model.ContainerType in project aws-iot-greengrass-edge-connector-for-kinesis-video-stream by awslabs.

the class RecorderBranchBaseUnitTest method getExtensionTest_getExtensionByInvalidType_throwException.

@Test
public void getExtensionTest_getExtensionByInvalidType_throwException() {
    RecorderCapability cap = RecorderCapability.VIDEO_AUDIO;
    ContainerType type = ContainerType.UNSUPPORTED;
    RecorderBranchTest testBranch = new RecorderBranchTest(cap);
    Assertions.assertThrows(IllegalArgumentException.class, () -> testBranch.getExtension(type));
}
Also used : RecorderCapability(com.aws.iot.edgeconnectorforkvs.videorecorder.model.RecorderCapability) ContainerType(com.aws.iot.edgeconnectorforkvs.videorecorder.model.ContainerType) Test(org.junit.jupiter.api.Test)

Example 4 with ContainerType

use of com.aws.iot.edgeconnectorforkvs.videorecorder.model.ContainerType in project aws-iot-greengrass-edge-connector-for-kinesis-video-stream by awslabs.

the class RecorderBranchBaseUnitTest method getMuxerTest_getMuxerByType_nonNullValue.

@Test
public void getMuxerTest_getMuxerByType_nonNullValue() {
    willReturn(this.mockMuxer).given(this.mockGst).newElement(anyString());
    RecorderCapability cap = RecorderCapability.VIDEO_AUDIO;
    ContainerType type = ContainerType.MATROSKA;
    RecorderBranchTest testBranch = new RecorderBranchTest(cap);
    Assertions.assertNotNull(testBranch.getMuxer(type, true));
    Assertions.assertNotNull(testBranch.getMuxer(type, false));
}
Also used : RecorderCapability(com.aws.iot.edgeconnectorforkvs.videorecorder.model.RecorderCapability) ContainerType(com.aws.iot.edgeconnectorforkvs.videorecorder.model.ContainerType) Test(org.junit.jupiter.api.Test)

Aggregations

ContainerType (com.aws.iot.edgeconnectorforkvs.videorecorder.model.ContainerType)4 RecorderCapability (com.aws.iot.edgeconnectorforkvs.videorecorder.model.RecorderCapability)4 Test (org.junit.jupiter.api.Test)4