public void GetFileLoaderThrowsArgumentNullExceptionIfPasswordIsNull() { var loader = new LoaderFactory(); byte[] stream = { 1, 0 }; loader.GetFileLoader(stream, null); }
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); }
public void GetFileLoaderThrowsInValidOperationExceptionForInvalifFileFormat() { var loader = new LoaderFactory(); byte[] stream = { 1, 2 }; var password = new Password("password", "password2"); var fileFormatLoader = loader.GetFileLoader(stream, password); }
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()); }
public void GetFileLoaderThrowsArgumentNullExceptionIfByteStreamIsNull() { var loader = new LoaderFactory(); loader.GetFileLoader(null, null); }