1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.Facilities
.ActiveRecordIntegration
.Tests
18 using Castle
.Core
.Resource
;
21 using Castle
.ActiveRecord
;
22 using Castle
.Windsor
.Configuration
.Interpreters
;
23 using NUnit
.Framework
;
25 using Castle
.Facilities
.ActiveRecordIntegration
.Tests
.Model
;
26 using Castle
.Facilities
.AutomaticTransactionManagement
;
29 public class AbstractActiveRecordTest
31 protected IWindsorContainer container
;
36 container
= new WindsorContainer(new XmlInterpreter(new ConfigResource()));
38 container
.AddFacility("transactionfacility", new TransactionFacility() );
39 container
.AddFacility("arfacility", new ActiveRecordFacility() );
41 container
.AddComponent( "blog.service", typeof(BlogService
) );
42 container
.AddComponent( "post.service", typeof(PostService
) );
43 container
.AddComponent( "first.service", typeof(FirstService
) );
44 container
.AddComponent( "wiring.service", typeof(WiringSession
) );
50 public void Terminate()
54 ActiveRecordStarter
.DropSchema();
64 protected void Recreate()
66 ActiveRecordStarter
.CreateSchema();