|
/*
* Wird jetzt alles in General Tests gemacht
*
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Technewlogic.Stasy.Framework;
using Technewlogic.Stasy.Test.Model;
using Technewlogic.Stasy.Framework.Proxy;
namespace Technewlogic.Stasy.Test.EntityCollection
{
[TestFixture]
public class UpdateHandling
{
[TestFixtureSetUp]
public void TestFixtureSetUp()
{
}
[SetUp]
public void SetUp()
{
}
// Mit dem Proxy sollen Property-Änderungen IMMER getrackt werden.
//[Test]
//public void IgnorePropertyChangesForInvalidBO()
//{
// var generator = new Generator(new[] { typeof(NumberWrapper) });
// var testEntities = new List<NumberWrapper>();
// var num = generator.CreateProxy(typeof(NumberWrapper)) as NumberWrapper;
// num.Number = 1;
// testEntities.Add(num);
// var testCollection = new Technewlogic.Stasy.Framework.EntityCollection(
// new EntityContextManager(),
// testEntities.Cast<IProxy>(),
// typeof(NumberWrapper));
// var cts = testCollection.GetState(num as IProxy);
// Assert.AreEqual(SynchronizationOperation.Nothing, cts.SynchronizationOperation);
// num.Number = 999;
// Assert.AreEqual(SynchronizationOperation.Nothing, cts.SynchronizationOperation);
// num.Number = 123;
// Assert.AreEqual(SynchronizationOperation.Nothing, cts.SynchronizationOperation);
//}
[Test]
public void HandlePropertyChangesForValidBO()
{
var generator = new Generator(new[] { typeof(OrderType) });
var orderTypes = new List<OrderType>();
var myOrderType = generator.CreateProxy(typeof(OrderType)) as OrderType;
myOrderType.Name = "MyOrderType";
myOrderType.Priority = 123;
orderTypes.Add(myOrderType);
var testCollection = new Technewlogic.Stasy.Framework.EntityCollection(
new EntityContextManager(),
orderTypes.Cast<IProxy>(),
typeof(OrderType));
var cts = testCollection.GetState(myOrderType as IProxy);
Assert.AreEqual(SynchronizationOperation.Nothing, cts.SynchronizationOperation);
myOrderType.Priority = 999;
Assert.AreEqual(SynchronizationOperation.Updated, cts.SynchronizationOperation);
myOrderType.Priority = 123;
Assert.AreEqual(SynchronizationOperation.Updated, cts.SynchronizationOperation);
}
}
}
*/
|
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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.