예제 #1
0
        protected override void Establish_context()
        {
            _clipboard = CreateStub<IClipboard>();
            _specParser = CreateStub<ISpecParser>();
            _cSharpCodeWriter = CreateStub<ICodeWriter>();
            _application = new Application(_clipboard, _specParser, _cSharpCodeWriter);

            var parsedSpec = new ParsedSpec();

            _clipboard.Stub(c => c.GetData()).Return("spec");
            _specParser.Stub(p => p.Parse("spec")).Return(parsedSpec);
            _cSharpCodeWriter.Stub(w => w.WriteCode(parsedSpec)).Return("code");
        }