User: mzywitza
Date: 2010/01/05 10:29 AM
Added:
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests/PropertyAccessTests/
Project.cs, Task.cs, TestCases.cs
Removed:
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests/PropertyAccessTests/
Project.cs, Task.cs, TestCases.cs
Modified:
/ActiveRecord/branches/2.x/
/ActiveRecord/branches/2.x/src/
Castle.ActiveRecord-vs2008.sln, Changes.txt, License.txt, Readme.txt, Running
the test cases.txt, TODO.txt, activerecord.build
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Framework.Internal.Tests/
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Framework.Internal.Tests/Model/
PropertyAccessHelperTests.cs
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Linq.Tests/
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Linq/
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests.Model/
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests/
Castle.ActiveRecord.Tests-vs2008.csproj
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord/
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord/Attributes/
PropertyAccess.cs
Log:
merge of r6576 with inheritance to sync both branches
Added support for access="backfield" and access="readonly". Idea and
implementation by xtoff.
Directory Changes:
Directory: /ActiveRecord/branches/2.x/
======================================
Property changes on: ActiveRecord/branches/2.x
___________________________________________________________________
Directory: /ActiveRecord/branches/2.x/src/Castle.ActiveRecord/
==============================================================
Property changes on: ActiveRecord/branches/2.x/src/Castle.ActiveRecord
___________________________________________________________________
Directory:
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Framework.Internal.Tests/
=======================================================================================
Property changes on:
ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Framework.Internal.Tests
___________________________________________________________________
Directory: /ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Linq/
===================================================================
Property changes on: ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Linq
___________________________________________________________________
Directory: /ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Linq.Tests/
=========================================================================
Property changes on:
ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Linq.Tests
___________________________________________________________________
Directory: /ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests/
====================================================================
Property changes on: ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests
___________________________________________________________________
Directory: /ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests.Model/
==========================================================================
Property changes on:
ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests.Model
___________________________________________________________________
Directory: /svn:mergeinfo/
==========================
- /branches/ActiveRecord/trunk/ActiveRecord/activerecord.build:5876
+ /ActiveRecord/trunk/src/activerecord.build:6576
/branches/ActiveRecord/trunk/ActiveRecord/activerecord.build:5876
File Changes:
Directory: /ActiveRecord/branches/2.x/src/Castle.ActiveRecord/Attributes/
=========================================================================
File [modified]: PropertyAccess.cs
Delta lines: +0 -0
===================================================================
Directory: /ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests/
====================================================================
File [modified]: Castle.ActiveRecord.Tests-vs2008.csproj
Delta lines: +0 -31
===================================================================
---
ActiveRecord/trunk/src/Castle.ActiveRecord.Tests/PropertyAccessTests/Project.cs
2010-01-05 17:12:08 UTC (rev 6576)
+++
ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests/PropertyAccessTests/Project.cs
2010-01-05 17:29:40 UTC (rev 6577)
@@ -1,31 +0,0 @@
-// Copyright 2004-2009 Castle Project - http://www.castleproject.org/
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-namespace Castle.ActiveRecord.Tests.PropertyAccessTests
-{
- using System.Collections.Generic;
-
- [ActiveRecord]
- public class Project : ActiveRecordBase<Project>
- {
- [PrimaryKey]
- public int Id { get; protected set; }
-
- [HasMany(Access = PropertyAccess.AutomaticProperty)]
- public IList<Task> Tasks { get; set; }
-
- [Property]
- public string Name { get; set; }
- }
-}
Directory:
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Framework.Internal.Tests/Model/
=============================================================================================
File [modified]: PropertyAccessHelperTests.cs
Delta lines: +0 -0
===================================================================
Directory:
/ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests/PropertyAccessTests/
========================================================================================
File [removed]: Project.cs
Delta lines: +0 -37
===================================================================
---
ActiveRecord/trunk/src/Castle.ActiveRecord.Tests/PropertyAccessTests/Task.cs
2010-01-05 17:12:08 UTC (rev 6576)
+++
ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests/PropertyAccessTests/Task.cs
2010-01-05 17:29:40 UTC (rev 6577)
@@ -1,37 +0,0 @@
-// Copyright 2004-2009 Castle Project - http://www.castleproject.org/
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-namespace Castle.ActiveRecord.Tests.PropertyAccessTests
-{
- using System;
-
- [ActiveRecord]
- public class Task : ActiveRecordBase<Task>
- {
- [PrimaryKey]
- public int Id { get; protected set; }
-
- [BelongsTo]
- public Project Project { get; set; }
-
- [Property]
- public string Name { get; set; }
-
- [Property]
- public DateTime? ScheduledDate { get; set; }
-
- [Property(Access=PropertyAccess.ReadOnly)]
- public bool IsScheduled { get { return ScheduledDate != null; }
}
- }
-}
File [added]: Project.cs
Delta lines: None
None
File [removed]: Task.cs
Delta lines: +0 -59
===================================================================
---
ActiveRecord/trunk/src/Castle.ActiveRecord.Tests/PropertyAccessTests/TestCases.cs
2010-01-05 17:12:08 UTC (rev 6576)
+++
ActiveRecord/branches/2.x/src/Castle.ActiveRecord.Tests/PropertyAccessTests/TestCases.cs
2010-01-05 17:29:40 UTC (rev 6577)
@@ -1,60 +0,0 @@
-// Copyright 2004-2009 Castle Project - http://www.castleproject.org/
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-namespace Castle.ActiveRecord.Tests.PropertyAccessTests
-{
- using System;
- using NUnit.Framework;
-
- [TestFixture]
- class TestCases : NUnitInMemoryTest
- {
- public override Type[] GetTypes()
- {
- return new [] {typeof(Project), typeof(Task)};
- }
-
- [Test]
- public void TasksCollectionIsCreated()
- {
- createSampleProject();
-
- var project = Project.FindFirst();
- Assert.That(project.Tasks, Is.Not.Null);
- Assert.That(project.Tasks, Is.Not.Empty);
- }
-
- [Test]
- public void IsScheduledIsSetInDatabase()
- {
- createSampleProject();
- var tasks = Task.FindAllByProperty("IsScheduled", true);
-
- Assert.That(tasks, Is.Not.Null);
- Assert.That(tasks.Length, Is.EqualTo(1));
- }
-
- private void createSampleProject()
- {
- var project = new Project() {Name="Release AR"};
- project.Save();
-
- var task1 = new Task() {Name = "Create Tag", Project =
project};
- var task2 = new Task() { Name = "Upload Zip", Project =
project, ScheduledDate = DateTime.Today.AddDays(7)};
-
- task1.Save();
- task2.Save();
- }
- }
File [added]: Task.cs
Delta lines: None
None
File [removed]: TestCases.cs
Delta lines: +0 -0
===================================================================
File [added]: TestCases.cs
Delta lines: None
None
Directory: /ActiveRecord/branches/2.x/src/
==========================================
File [modified]: Castle.ActiveRecord-vs2008.sln
Delta lines: +0 -0
===================================================================
Property changes on:
ActiveRecord/branches/2.x/src/Castle.ActiveRecord-vs2008.sln
___________________________________________________________________
File [modified]: Changes.txt
Delta lines: +0 -0
===================================================================
Property changes on: ActiveRecord/branches/2.x/src/Changes.txt
___________________________________________________________________
File [modified]: License.txt
Delta lines: +0 -0
===================================================================
Property changes on: ActiveRecord/branches/2.x/src/License.txt
___________________________________________________________________
File [modified]: Readme.txt
Delta lines: +0 -0
===================================================================
Property changes on: ActiveRecord/branches/2.x/src/Readme.txt
___________________________________________________________________
File [modified]: Running the test cases.txt
Delta lines: +0 -0
===================================================================
Property changes on: ActiveRecord/branches/2.x/src/Running the test cases.txt
___________________________________________________________________
File [modified]: TODO.txt
Delta lines: +0 -0
===================================================================
Property changes on: ActiveRecord/branches/2.x/src/TODO.txt
___________________________________________________________________
File [modified]: activerecord.build
Delta lines: +0 -0
===================================================================
Property changes on: ActiveRecord/branches/2.x/src/activerecord.build
___________________________________________________________________
--
You received this message because you are subscribed to the Google Groups
"Castle Project Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-commits?hl=en.