public void RetrievesPathFromRequest() { var mock = MockRepository.GenerateMock<IRequest>(); var impl = new HandlerImpl(mock, response, engine, lessSource); impl.Execute(); mock.AssertWasCalled(p => p.LocalPath); }
public void WritesEngineOutputToResponse() { var mock = MockRepository.GenerateStub<IResponse>(); string output = "myCss"; engine.Stub(p => p.TransformToCss(null)).IgnoreArguments().Return(output); var impl = new HandlerImpl(request, mock, engine, lessSource); impl.Execute(); mock.AssertWasCalled(p => p.WriteCss(output)); }
public void LoadsFileThroughSource() { var mock = MockRepository.GenerateMock<ILessSource>(); string path = "abc"; request.Stub(p => p.LocalPath).Return(path); var impl = new HandlerImpl(request, response, engine, mock); impl.Execute(); mock.AssertWasCalled(p => p.GetSource(path)); }