I've got a class that takes a string for the path to an xml file and outputs an object. I want to test the class using NUnit with some pre generated test scripts.
I have the scripts in a zip file and included in the project. I want to do something like this:
// Not sure how to do this
List<byte[]> scripts = GetTheScriptsSomehow();
foreach(var script in scripts )
{
var parsedScript = ScriptParser.Parse(script);
Assert.AreEqual(parsedScript.Blah, "BLAH");
}
The part I'm most concerned with is how to access the scripts that are zipped and part of the project.
Thanks!
Edit: To address some of the comments, the zip file is part of a unit test project, not the released codebase. It contains test scripts that should produce a known output that is testable. They're zipped because the scripts are rather large (100mb each)
ScriptParser.Parse. There's no other "components" involved except from loading test data from resources (wouldn't call it component though). Nothing wrong with this test (maybe except thatforeach, but I'm not the one to judge).