示例#1
0
        public void GetFileLoaderThrowsArgumentNullExceptionIfPasswordIsNull()
        {
            var loader = new LoaderFactory();

            byte[] stream = { 1, 0 };
            loader.GetFileLoader(stream, null);
        }
示例#2
0
        private void LoadDocument(string fileName, IPassword password)
        {
            var buffer     = _fileProxy.Load(fileName);
            var loader     = new LoaderFactory();
            var fileLoader = loader.GetFileLoader(buffer, password);

            EncodedData = fileLoader.Load(buffer);
        }
示例#3
0
        public void GetFileLoaderThrowsInValidOperationExceptionForInvalifFileFormat()
        {
            var loader = new LoaderFactory();

            byte[] stream           = { 1, 2 };
            var    password         = new Password("password", "password2");
            var    fileFormatLoader = loader.GetFileLoader(stream, password);
        }
示例#4
0
        public void GetFileLoaderReturnsLoaderForVersion10Files()
        {
            var loader = new LoaderFactory();

            byte[] stream           = { 1, 0 };
            var    password         = new Password("password", "password2");
            var    fileFormatLoader = loader.GetFileLoader(stream, password);

            Assert.AreEqual(typeof(Version10Loader), fileFormatLoader.GetType());
        }
示例#5
0
        public void GetFileLoaderThrowsArgumentNullExceptionIfByteStreamIsNull()
        {
            var loader = new LoaderFactory();

            loader.GetFileLoader(null, null);
        }