BooLangStudioSpecs.ViewFilter.WhenHandleSmartIndentActionExecutes.ReturnWithNoIndentHasNextLineWithNoIndent C# (CSharp) Method

ReturnWithNoIndentHasNextLineWithNoIndent() private method

private ReturnWithNoIndentHasNextLineWithNoIndent ( ) : void
return void
        public void ReturnWithNoIndentHasNextLineWithNoIndent()
        {
            var source = MockRepository.GenerateMock<ISource>();
            var view = MockRepository.GenerateStub<IVsTextView>();

            source.Stub(x => x.GetLine(LineNumber - 1)).Return("return");
            source.Stub(x => x.ScanToNonWhitespaceChar(LineNumber)).Return(LastCharColumn);
            source.Stub(x => x.UseTabs).Return(true);

            // expect call to SetText with one tab indent
            source.Expect(x => x.SetText(LineNumber, LastCharColumn, ""));

            new LineIndenter(source, view)
                .SetIndentationForNextLine(LineNumber);

            source.VerifyAllExpectations();
        }