1 // Copyright 2004-2007 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
.ActiveRecord
.Tests
17 using System
.Collections
;
19 using NUnit
.Framework
;
22 public class BugTestCase
: AbstractActiveRecordTest
25 public void SemanticVisitorBug()
27 ActiveRecordStarter
.Initialize(GetConfigSource(),
28 typeof(Bank
), typeof(Customer
), typeof(Card
));
34 public void InheritanceBug()
36 ActiveRecordStarter
.Initialize(GetConfigSource(),
37 typeof(Parent
), typeof(Child
), typeof(GrandChild
));
41 #region SemanticVisitorBug related
44 public class Bank
: ActiveRecordBase
47 private IList customers
;
64 [HasMany(typeof(Customer
))]
65 public IList Customers
67 get { return customers; }
68 set { customers = value; }
73 public class Customer
: ActiveRecordBase
93 [HasMany(typeof(Card
))]
97 set { cards = value; }
102 public class Card
: ActiveRecordBase
105 private Customer customer
;
115 public Customer Customer
117 get { return customer; }
118 set { customer = value; }
124 #region InheritanceBug related
126 public class Parent
: ActiveRecordBase
138 public class Child
: Parent
143 public class GrandChild
: Child