Exemplo n.º 1
0
        public void RetrievesPathFromRequest()
        {
            var mock = MockRepository.GenerateMock<IRequest>();

            var impl = new HandlerImpl(mock, response, engine, lessSource);

            impl.Execute();

            mock.AssertWasCalled(p => p.LocalPath);
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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));
        }