public void GetFileData_No_Argument() { FileDetails fileDetails = new FileDetails(); FileDataManager manager = new FileDataManager(fileDetails); var arguments = new string[] { "f:/test.txt" }; var result = manager.GetFileData(arguments); Assert.AreEqual("No valid input", result); }
public void GetFileData_No_Valid_File_Path() { FileDetails fileDetails = new FileDetails(); FileDataManager manager = new FileDataManager(fileDetails); var arguments = new string[] { "--size", }; var result = manager.GetFileData(arguments); Assert.AreEqual("No valid input", result); }
public void GetFileData_Version_Third_Pattern() { FileDetails fileDetails = new FileDetails(); FileDataManager manager = new FileDataManager(fileDetails); var arguments = new string[] { "--v", "f:/test.txt" }; var result = manager.GetFileData(arguments); Assert.IsTrue(result.Contains("File version:")); }
public void GetFileData_Verions_Mixed_case_Invalid_Symbol() { FileDetails fileDetails = new FileDetails(); FileDataManager manager = new FileDataManager(fileDetails); var arguments = new string[] { "--VeRsiOn//", "f:/test.txt", }; var result = manager.GetFileData(arguments); Assert.IsTrue(result.Contains("Invalid argument(s) supplied")); }
public void GetFileData_Verions_Mixed_case() { FileDetails fileDetails = new FileDetails(); FileDataManager manager = new FileDataManager(fileDetails); var arguments = new string[] { "--VeRsiOn", "f:/test.txt", }; var result = manager.GetFileData(arguments); Assert.IsTrue(result.Contains("File version:")); }
public void GetFileData_Size() { FileDetails fileDetails = new FileDetails(); FileDataManager manager = new FileDataManager(fileDetails); var arguments = new string[] { "-S", "f:/test.txt" }; var result = manager.GetFileData(arguments); Assert.IsTrue(result.Contains("File size:")); }
public void GetFileData_No_Valid_Argument() { FileDetails fileDetails = new FileDetails(); FileDataManager manager = new FileDataManager(fileDetails); var arguments = new string[] { "----R", "f:/test.txt" }; var result = manager.GetFileData(arguments); Assert.IsTrue(result.Contains("Invalid argument(s) supplied")); }
public void GetFileData_More_File_Paths() { FileDetails fileDetails = new FileDetails(); FileDataManager manager = new FileDataManager(fileDetails); var arguments = new string[] { "--VeRsiOn//", "f:/test.txt", "f:/test.txt", "f:/test.txt", }; var result = manager.GetFileData(arguments); Assert.AreEqual("No valid input", result); }
public void GetFileData_Verions_Size_Arugments_Different_Position() { FileDetails fileDetails = new FileDetails(); FileDataManager manager = new FileDataManager(fileDetails); var arguments = new string[] { "--version", "f:/test.txt", "--size" }; var result = manager.GetFileData(arguments); Assert.IsTrue(result.Contains("File version:")); Assert.IsTrue(result.Contains("File size:")); }
public void GetFileData_Verions_Size_More_Arguments() { FileDetails fileDetails = new FileDetails(); FileDataManager manager = new FileDataManager(fileDetails); var arguments = new string[] { "--version", "f:/test.txt", "--size", "--size", "--size", }; var result = manager.GetFileData(arguments); Assert.AreEqual("No valid input", result); }