コード例 #1
0
        public void ReadHeader_WhenStateIsBeforeTag_ThrowsInvalidOperationException()
        {
            // Arrange
            _flvReader = _flvReaderObjectMother.CreateFlvReaderWithTag();

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

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

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

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

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

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

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

            // Assert
            Assert.NotNull(header);
        }