public void OutputCategory_MessageViewCategoryAlreadyCreated_ReturnsOutputCategoryFromMessageViewCategory() { CreateCompilerMessageView(); var messageCategoryView = new FakeMessageCategoryView(); IOutputCategory expectedCategory = MockRepository.GenerateStub <IOutputCategory>(); messageCategoryView.OutputCategory = expectedCategory; fakeCompilerMessageView.GetExistingReturnValue = messageCategoryView; CreateView(fakeCompilerMessageView); IOutputCategory outputCategory = view.OutputCategory; Assert.AreEqual(expectedCategory, outputCategory); }
void CreateCompilerMessageView() { fakeCompilerMessageView = new FakeCompilerMessageView(); fakeMessageCategoryView = fakeCompilerMessageView.FakeMessageCategoryView; }