public void Check_File_Exists()
        {
            StubIFileRepository fileRepository = new StubIFileRepository()
            {
                GetItemInt32String = (userId, fileName) =>
                {
                    return new File() { Name = "test", FileId = 100, Status = "Uploaded" };
                }
            };


            IUnitOfWork unitOfWork =
                new Fakes.StubIUnitOfWork()
                {
                    Commit = () => { return; }
                };
            StubIBlobDataRepository blobDataRepository = new StubIBlobDataRepository()
            {
                GetBlobContentString = (name) =>
                {
                    return new DataDetail();
                }
            };
            IRepositoryDetails repositoryDetails = new StubIRepositoryDetails();
            IRepositoryService repositoryService = new StubIRepositoryService();
            IRepositoryAdapterFactory repositoryAdapterFactory = new StubIRepositoryAdapterFactory();

            var fileProvider = new FileServiceProvider(fileRepository, blobDataRepository, unitOfWork, repositoryDetails, repositoryService, repositoryAdapterFactory);
            var result = fileProvider.CheckFileExists("test", 100);
            Assert.AreEqual(true, result);
            Assert.AreEqual(true, true);
        }
        public async Task RemoveErrors_ShouldRemoveErrorsAndUpdateTheFile()
        {
            IFileRepository fileRepository = new StubIFileRepository()
            {
                GetItemInt32Int32 = (userId, FileId) => new File() { Name = "abc.xlsx" },
                UpdateFileFile = file => file
            };

            IBlobDataRepository blobDataRepository = new StubIBlobDataRepository()
            {
                UploadFileDataDetail = dataDetail => true
            };

            IUnitOfWork unitOfWork = new StubIUnitOfWork();

            IFileProcesser fileProcessor = new StubIFileProcesser()
            {
                RemoveErrorStreamStringIEnumerableOfErrorType = (file, sheetName, ErrorTypeList) => { System.IO.Stream stream = new System.IO.MemoryStream(); return Task.FromResult(stream); }
            };

            using (ShimsContext.Create())
            {
                ShimFileFactory.GetFileTypeInstanceStringIBlobDataRepositoryIFileRepositoryIRepositoryService = (fe, bdr, fdr, rs) => fileProcessor;
                ShimStreamExtensions.GetBytesAsyncStream = stream => Task.FromResult(new byte[0]);
                var fileService = new FileServiceProvider(fileRepository, blobDataRepository, unitOfWork, null, null, null);
                await fileService.RemoveErrors(0, 0, null, null);
                Assert.IsTrue(true);
            }
        }