Example #1
0
        public void ReadHeader_WhenStateIsBeforeTag_ThrowsInvalidOperationException()
        {
            // Arrange
            _flvReader = _flvReaderObjectMother.CreateFlvReaderWithTag();

            // Act and assert.
            Assert.Throws <InvalidOperationException>(() => _flvReader.ReadHeader());
        }
Example #2
0
        public void ReadHeader_ReachedEndOfStream_ThrowsInvalidOperationException()
        {
            // Arrange
            _flvReader = _flvReaderObjectMother.CreateEmptyFlvReader();

            // Act and assert.
            Assert.Throws <InvalidOperationException>(() => _flvReader.ReadHeader());
        }
Example #3
0
        public void ReadHeader_WhenStateIsBeforeHeader_ReturnsHeader()
        {
            // Arrange
            _flvReader = _flvReaderObjectMother.CreateFlvReaderWithHeader();

            // Act
            var header = _flvReader.ReadHeader();

            // Assert
            Assert.NotNull(header);
        }
Example #4
0
        public void ReadHeader_WhenStateIsBeforeBackpointer_ThrowsInvalidOperationException()
        {
            // Arrange
            _flvReader = _flvReaderObjectMother.CreateFlvReaderWithBackpointer();

            // Act and assert.
            Assert.Throws<InvalidOperationException>(() => _flvReader.ReadHeader());
        }
Example #5
0
        public void ReadHeader_ReachedEndOfStream_ThrowsInvalidOperationException()
        {
            // Arrange
            _flvReader = _flvReaderObjectMother.CreateEmptyFlvReader();

            // Act and assert.
            Assert.Throws<InvalidOperationException>(() => _flvReader.ReadHeader());
        }
Example #6
0
        public void ReadHeader_WhenStateIsBeforeHeader_ReturnsHeader()
        {
            // Arrange
            _flvReader = _flvReaderObjectMother.CreateFlvReaderWithHeader();

            // Act
            var header = _flvReader.ReadHeader();

            // Assert
            Assert.NotNull(header);
        }