C# 클래스 !NAMESPACE!.AbstractModelTestCase

This is a suggestion of base class that might simplify the unit testing for the ActiveRecord classes.

Basically you have to create a separate database for your tests, which is always a good idea: - production - development - test

You have to decide if you want to administrate the schema on the test database or let ActiveRecord generate them for you during test execution. Check AbstractModelTestCase.PrepareSchema

Note that this class enables lazy classes and collections by using a SessionScope. This have side effects. Some of your test must invoke Flush to persist the changes.
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono

보호된 프로퍼티들

프로퍼티 타입 설명
scope Castle.ActiveRecord.SessionScope

보호된 메소드들

메소드 설명
CreateScope ( ) : void
DisposeScope ( ) : void
DropSchema ( ) : void
Flush ( ) : void
InitFramework ( ) : void
PrepareSchema ( ) : void

If you want to delete everything from the model. Remember to do it in a descendent dependency order

비공개 메소드들

메소드 설명
FixtureInit ( ) : void
Init ( ) : void
Terminate ( ) : void
TerminateAll ( ) : void

메소드 상세

CreateScope() 보호된 메소드

protected CreateScope ( ) : void
리턴 void

DisposeScope() 보호된 메소드

protected DisposeScope ( ) : void
리턴 void

DropSchema() 보호된 메소드

protected DropSchema ( ) : void
리턴 void

Flush() 보호된 메소드

protected Flush ( ) : void
리턴 void

InitFramework() 보호된 메소드

protected InitFramework ( ) : void
리턴 void

PrepareSchema() 보호된 메소드

If you want to delete everything from the model. Remember to do it in a descendent dependency order
protected PrepareSchema ( ) : void
리턴 void

프로퍼티 상세

scope 보호되어 있는 프로퍼티

protected SessionScope,Castle.ActiveRecord scope
리턴 Castle.ActiveRecord.SessionScope