Example #1
0
        private bool disposedValue; // To detect redundant calls

        protected async Task Init()
        {
            Amazon = await Authenticate();

            if (Amazon == null)
            {
                throw new InvalidOperationException("Authentication failed");
            }

            DeleteDir("TempCache");

            Provider = new FSProvider(Amazon, (a, b, c) => Task.FromResult(0))
            {
                CachePath           = "TempCache",
                SmallFilesCacheSize = 20 * (1 << 20),
                SmallFileSizeLimit  = 1 * (1 << 20)
            };

            try
            {
                await Provider.DeleteDir("\\ACDDokanNetTest");
            }
            catch (FileNotFoundException)
            {
                //Ignore
            }
            await Provider.CreateDir("\\ACDDokanNetTest");
        }
Example #2
0
        private bool disposedValue = false; // To detect redundant calls

        protected FSProviderTestsBase()
        {
            Amazon = Authenticate().Result;
            if (Amazon == null)
            {
                throw new InvalidOperationException("Authentication failed");
            }

            DeleteDir("TempCache");

            Provider                     = new FSProvider(Amazon);
            Provider.CachePath           = "TempCache";
            Provider.SmallFilesCacheSize = 20 * (1 << 20);
            Provider.SmallFileSizeLimit  = 1 * (1 << 20);

            Provider.DeleteDir("\\ACDDokanNetTest");
            Provider.CreateDir("\\ACDDokanNetTest");
        }