public void NoOnLoaded_ByGetObjectReference()
        {
            var id = new ObjectID("ClassWithAllDataTypes", new Guid("{3F647D79-0CAF-4a53-BAA7-A56831F8CE2D}"));

            var classWithAllDataTypes = id.GetObjectReference <ClassWithAllDataTypes> ();

            Assert.That(classWithAllDataTypes.OnLoadedCalled, Is.False);
        }
        public void OnLoaded_OnFirstAccess()
        {
            var id = new ObjectID("ClassWithAllDataTypes", new Guid("{3F647D79-0CAF-4a53-BAA7-A56831F8CE2D}"));

            var classWithAllDataTypes = id.GetObjectReference <ClassWithAllDataTypes> ();

            classWithAllDataTypes.Int32Property = 5;

            Assert.That(classWithAllDataTypes.OnLoadedCalled, Is.True);
            Assert.That(classWithAllDataTypes.OnLoadedCallCount, Is.EqualTo(1));
            Assert.That(classWithAllDataTypes.OnLoadedLoadMode, Is.EqualTo(LoadMode.WholeDomainObjectInitialized));
        }
        public void GetObjectReference_ReturnsReferenceFromGivenTransaction()
        {
            var result = _orderID1.GetObjectReference <Order> (_clientTransaction);

            CheckDomainObject(result, _clientTransaction, expectedID: _orderID1, expectedState: StateType.NotLoadedYet);
        }