Zippy.tests.ps1

describe Zippy {
    context 'Zippy is a Compression Module' {
        it 'Compresses and Expands with Brotli by default' {
            Compress-Zippy -Text "Hello World" | 
                Expand-Zippy | 
                    Should -Be "Hello World"
        }
        it 'Can compress and expand with deflate' {
            Compress-Zippy -Text "Hello World" -Algorithm Deflate | 
                Expand-Zippy -Algorithm Deflate | 
                    Should -Be "Hello World"
        }
        it 'Can compress and expand with gzip' {
            Compress-Zippy -Text "Hello World" -Algorithm GZip | 
                Expand-Zippy -Algorithm GZip | 
                    Should -Be "Hello World"
        }
        it 'Can compress and expand with zlib' {
            Compress-Zippy -Text "Hello World" -Algorithm ZLib | 
                Expand-Zippy -Algorithm ZLib | 
                    Should -Be "Hello World"
        }        
    }

    context 'Piping Bytes' {
        it 'Compresses and Expands with Brotli by default' {
            Compress-Zippy -Text "Hello World" -AsByteStream | 
                Expand-Zippy | 
                    Should -Be "Hello World"
        }
        it 'Can compress and expand with deflate' {
            Compress-Zippy -Text "Hello World" -Algorithm Deflate -AsByteStream | 
                Expand-Zippy -Algorithm Deflate | 
                    Should -Be "Hello World"
        }
        it 'Can compress and expand with gzip' {
            Compress-Zippy -Text "Hello World" -Algorithm GZip -AsByteStream | 
                Expand-Zippy -Algorithm GZip | 
                    Should -Be "Hello World"
        }
        it 'Can compress and expand with zlib' {
            Compress-Zippy -Text "Hello World" -Algorithm ZLib -AsByteStream | 
                Expand-Zippy -Algorithm ZLib | 
                    Should -Be "Hello World"
        }
    } 
}