private void CheckContainer(Container c, ISet expectedInitializedObjects, ISet expectedReadOnlyObjects, ISession s) { CheckObject(c, expectedInitializedObjects, expectedReadOnlyObjects, s); if (!expectedInitializedObjects.Contains(c)) { return; } //CheckObject(c.NoProxyInfo, expectedInitializedObjects, expectedReadOnlyObjects, s); CheckObject(c.ProxyInfo, expectedInitializedObjects, expectedReadOnlyObjects, s); CheckObject(c.NonLazyInfo, expectedInitializedObjects, expectedReadOnlyObjects, s ); //CheckObject(c.NoProxyOwner, expectedInitializedObjects, expectedReadOnlyObjects, s ); CheckObject(c.ProxyOwner, expectedInitializedObjects, expectedReadOnlyObjects, s ); CheckObject(c.NonLazyOwner, expectedInitializedObjects, expectedReadOnlyObjects, s ); if (NHibernateUtil.IsInitialized(c.LazyDataPoints)) { foreach(DataPoint dp in c.LazyDataPoints) CheckObject(dp, expectedInitializedObjects, expectedReadOnlyObjects, s); foreach(DataPoint dp in c.NonLazyJoinDataPoints) CheckObject(dp, expectedInitializedObjects, expectedReadOnlyObjects, s); foreach(DataPoint dp in c.NonLazySelectDataPoints) CheckObject(dp, expectedInitializedObjects, expectedReadOnlyObjects, s); } }
private Container CreateContainer() { Container c = new Container("container"); //c.NoProxyInfo = new Info("no-proxy info"); c.ProxyInfo = new Info("proxy info"); c.NonLazyInfo = new Info("non-lazy info"); //c.NoProxyOwner = new Owner("no-proxy owner"); c.ProxyOwner = new Owner("proxy owner"); c.NonLazyOwner = new Owner("non-lazy owner"); c.LazyDataPoints.Add(new DataPoint(1M, 1M, "lazy data point")); c.NonLazyJoinDataPoints.Add(new DataPoint(2M, 2M, "non-lazy join data point")); c.NonLazySelectDataPoints.Add(new DataPoint(3M, 3M, "non-lazy select data point")); return c; }