Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect file specification #22

Open
ghost opened this issue May 6, 2016 · 0 comments
Open

Incorrect file specification #22

ghost opened this issue May 6, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented May 6, 2016

I was finding if a .trx file is specified which does not exist, Trxr would stop working. So I modified the Main method within the program to cover the situations of no file specified, an incorrect file specified to go with correct terms provided.

Program.cs line 26:
static void Main(string[] args)
{
if (args.Any())
{
string path = args[0].ToString();
if (!File.Exists(path))
{
Console.WriteLine("Incorrect file specified, Trxer.exe ");
return;
}
Console.WriteLine("Trx File\n{0}", args[0]);
Transform(args[0], PrepareXsl());
}
else
{
Console.WriteLine("No trx file specified, Trxer.exe ");
}
}

Tests:

Command input Outcome
Trxr.exe No trx file specified, Trxer.exe
Trxr.exe [noFileExists].trx Incorrect file specified, Trxer.exe
Trxr.exe [fileExists].trx Done transforming xml in to html

I did this as I was finding MSText.exe will not run one test at a time and I can run them in that manner if I specify each test at a time. This produces many trx files. Now I need to find a way to combine my many test results into one file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants