C# Класс Castle.MonoRail.TestSupport.BaseViewComponentTest

Base class to test view components.
You must call PrepareViewComponent before testing a view component instance and you should call CleanUp after each test case (use the TearDown).
Наследование: Castle.MonoRail.TestSupport.BaseControllerTest
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
OnBodyRender TestSectionRender
OnViewRender TestViewRender
SectionRender TestSectionRender>.IDictionary

Защищенные методы

Метод Описание
BaseViewComponentTest ( ) : System

Initializes a new instance of the BaseViewComponentTest class.

BuildViewComponentContext ( string viewComponentName ) : IMockViewComponentContext

Builds the view component context.

BuildViewEngine ( ) : IViewEngine

Builds the view engine.

CleanUp ( ) : void

Cleans the up all state created to test a view component.

PrepareViewComponent ( ViewComponent component ) : void

Initialize the view component with mock services it needs to be functional.

Описание методов

BaseViewComponentTest() защищенный Метод

Initializes a new instance of the BaseViewComponentTest class.
protected BaseViewComponentTest ( ) : System
Результат System

BuildViewComponentContext() защищенный Метод

Builds the view component context.
protected BuildViewComponentContext ( string viewComponentName ) : IMockViewComponentContext
viewComponentName string Name of the view component.
Результат IMockViewComponentContext

BuildViewEngine() защищенный Метод

Builds the view engine.
protected BuildViewEngine ( ) : IViewEngine
Результат IViewEngine

CleanUp() защищенный Метод

Cleans the up all state created to test a view component.
protected CleanUp ( ) : void
Результат void

PrepareViewComponent() защищенный Метод

Initialize the view component with mock services it needs to be functional.
protected PrepareViewComponent ( ViewComponent component ) : void
component Castle.MonoRail.Framework.ViewComponent The component instance.
Результат void

Описание свойств

OnBodyRender публичное свойство

This delegate is called when the viewcomponent renders its body.
public TestSectionRender OnBodyRender
Результат TestSectionRender

OnViewRender публичное свойство

This delegate is called when the viewcomponent renders a view
public TestViewRender OnViewRender
Результат TestViewRender

SectionRender публичное свойство

Use this dictionary to add inner sections as available inner sections to the view component.
public IDictionary SectionRender
Результат TestSectionRender>.IDictionary