public UserControlLz77()
        {
            InitializeComponent();

            var dependencyResolver = new DependencyResolver();

            lz77Encoder = (Lz77Encoder)dependencyResolver.GetObject <ILz77Encoder>();
            lz77Decoder = (Lz77Decoder)dependencyResolver.GetObject <ILz77Decoder>();
        }
        public void Setup()
        {
            var dependencyResolver = new DependencyResolver();

            lz77Encoder = (Lz77Encoder)dependencyResolver.GetObject <ILz77Encoder>();
            lz77Decoder = (Lz77Decoder)dependencyResolver.GetObject <ILz77Decoder>();

            filePathSource      = $"{Environment.CurrentDirectory}\\temp.bmp";
            filePathEncodedFile = $"{Environment.CurrentDirectory}\\temp.bmp.lz77";
            filePathDecodedFile = $"{Environment.CurrentDirectory}\\temp.png.lz77.bmp";
        }
Exemple #3
0
        public void Setup()
        {
            var dependencyResolver = new DependencyResolver();

            lz77Encoder = (Lz77Encoder)dependencyResolver.GetObject <ILz77Encoder>();

            filePathFile        = $"{Environment.CurrentDirectory}\\{Constants.FileName}";
            filePathEncodedFile = $"{Environment.CurrentDirectory}\\{Constants.FileName}.lz77";

            TestMethods.CreateFileWithTextContents(filePathFile, Constants.FileContents);
        }
Exemple #4
0
        public void Setup()
        {
            lz77TokenExtractorMock = new Mock <ILz77TokenExtractor>();
            lz77BufferManagerMock  = new Mock <ILz77BufferManager>();
            lz77TokenWriterMock    = new Mock <ILz77TokenWriter>();
            lz77Encoder            = new Lz77Encoder(lz77TokenExtractorMock.Object, lz77BufferManagerMock.Object, lz77TokenWriterMock.Object);

            InitializeLz77Buffer();

            fileReaderMock = new Mock <IFileReader>();
            fileWriterMock = new Mock <IFileWriter>();

            InitializeLz77TokenExtractorMock();
            InitializeLz77BufferManagerMock();
        }