public void CreateFile() { FolderRepository uploadRepository = new FolderRepository($@"{Utils.GetSetupDir()}\UploadFolder"); Stream fileStream = File.OpenRead($@"{Utils.GetSetupDir()}\UploadFolder\file1.txt"); DateTime createdTime = uploadRepository.CreateFile("Folder1", fileStream, "Dutta.txt"); FolderRepository dbRepository = new FolderRepository($@"{Utils.GetSetupDir()}\DbFolder"); List <Storage> difference = Utils.Compare(dbRepository, uploadRepository, "Folder1"); }
public void CreateFileTest() { FolderRepository folderRepository = new FolderRepository($@"{Utils.GetSetupDir()}\UploadFolder"); Stream fileStream = File.OpenRead($@"{Utils.GetSetupDir()}\UploadFolder\file1.txt"); folderRepository.CreateFile("Folder1", fileStream, "Bhanu.txt"); Storage input = new Storage { Name = "Bhanu.txt", IsFolder = false }; Assert.IsTrue(folderRepository.Exist("Folder1", input), "File not in the list"); }