private void AssertIsolation(IObjectContainer session1, IObjectContainer session2 ) { EmbeddedObjectContainerSessionTestCase.Item originalItem = RetrieveItem(session1); EmbeddedObjectContainerSessionTestCase.Item sessionItem = RetrieveItem(session2); Assert.AreNotSame(originalItem, sessionItem); Assert.AreEqual(originalItem, sessionItem); }
private EmbeddedObjectContainerSessionTestCase.Item RetrieveItem(IObjectContainer session) { IQuery query = session.Query(); query.Constrain(typeof(EmbeddedObjectContainerSessionTestCase.Item)); IObjectSet objectSet = query.Execute(); EmbeddedObjectContainerSessionTestCase.Item sessionItem = ((EmbeddedObjectContainerSessionTestCase.Item )objectSet.Next()); return(sessionItem); }
public override bool Equals(object obj) { if (GetType() != obj.GetType()) { return(false); } EmbeddedObjectContainerSessionTestCase.Item other = (EmbeddedObjectContainerSessionTestCase.Item )obj; if (_name == null) { if (other._name != null) { return(false); } } else { if (!_name.Equals(other._name)) { return(false); } } return(true); }
/// <exception cref="System.Exception"></exception> protected override void Store() { EmbeddedObjectContainerSessionTestCase.Item item = new EmbeddedObjectContainerSessionTestCase.Item ("one"); Store(item); }
/// <exception cref="System.Exception"></exception> protected override void Store() { EmbeddedObjectContainerSessionTestCase.Item item = new EmbeddedObjectContainerSessionTestCase.Item ("one"); Store(item); }