public void InstructionWorksEndToEnd(SetUp setup, string input, string expectedOutput) { var model = new ProgrammingModel(); var memory = new Memory(); setup(model, memory); var repl = new Repl(model, memory); if (!repl.TryRead(input)) Assert.Fail(string.Format("Unable to read assembly input: '{0}'", input)); if (!repl.Execute()) Assert.Fail(string.Format("Unable to execute input: '{0}'", input)); Assert.That(repl.PrintRegisters(), Is.StringContaining(expectedOutput)); }