Click here to Skip to main content
15,892,927 members
Articles / Programming Languages / C#

ObjectLounge - An Object-Oriented Database Framework

Rate me:
Please Sign up or sign in to vote.
4.07/5 (8 votes)
30 Jul 2009LGPL310 min read 44K   425   45  
Host your Domain Models "Out Of The Box" + No storage or schema needed + Transactions on Domain Models + Validation
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Technewlogic.ObjectLounge.Test.Model;
using Technewlogic.ObjectLounge.Framework.BaseConcerns;
using Technewlogic.ObjectLounge.Framework.Proxy;

namespace Technewlogic.ObjectLounge.Test
{
	public class C_ChangeTracking_EntityTests : BaseTest
	{
		/// <summary>
		/// An entity is created via the CreateInstance Method.
		/// Result: The SynchronizationOperation is Unknown.
		/// </summary>
		[Test]
		public void NewEntity_UnknownState()
		{
			var newEntity = _engine.CreateInstance<Order>();

			AssertAllEmpty();
		}

		/// <summary>
		/// An entity was loaded from the sync provider.
		/// Result: The SynchronizationOperation is Nothing.
		/// </summary>
		[Test]
		public void LoadedEntity_NothingState()
		{
			var oldCustomer = _context.Customers.Single(it => it.Name == Customer.SKName);
			var ctc = (oldCustomer as IProxy).ChangeTrackingConcern;

			AssertAllEmpty();
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Software Developer (Senior) www.technewlogic.de
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions