예제 #1
0
        public void Dispose()
        {
            CloneResourceSet rs = new CloneResourceSet(new ClonableObject());

            rs.Dispose();
            rs.Dispose();
        }
예제 #2
0
        public void GetString_Disposed()
        {
            CloneResourceSet rs = new CloneResourceSet(new ClonableObject());

            rs.Dispose();
            try {
                rs.GetString("doesnotexists");
                Assert.Fail("#1");
            } catch (ObjectDisposedException ex) {
                // Cannot access a closed resource set
                Assert.AreEqual(typeof(ObjectDisposedException), ex.GetType(), "#2");
                Assert.IsNull(ex.InnerException, "#3");
                Assert.IsNotNull(ex.Message, "#4");
            }
        }
예제 #3
0
        public void GetEnumerator_Disposed()
        {
            CloneResourceSet rs = new CloneResourceSet(new ClonableObject());

            rs.Dispose();
            try {
                rs.GetEnumerator();
                Assert.Fail("#1");
#if NET_2_0
            } catch (ObjectDisposedException ex) {
                // Cannot access a closed resource set
                Assert.AreEqual(typeof(ObjectDisposedException), ex.GetType(), "#2");
                Assert.IsNull(ex.InnerException, "#3");
                Assert.IsNotNull(ex.Message, "#4");
            }
#else
            } catch (InvalidOperationException ex) {
예제 #4
0
		public void GetString_Disposed ()
		{
			CloneResourceSet rs = new CloneResourceSet (new ClonableObject ());
			rs.Dispose ();
			try {
				rs.GetString ("doesnotexists");
				Assert.Fail ("#1");
			} catch (ObjectDisposedException ex) {
				// Cannot access a closed resource set
				Assert.AreEqual (typeof (ObjectDisposedException), ex.GetType (), "#2");
				Assert.IsNull (ex.InnerException, "#3");
				Assert.IsNotNull (ex.Message, "#4");
			}
		}
예제 #5
0
		public void Dispose ()
		{
			CloneResourceSet rs = new CloneResourceSet (new ClonableObject ());
			rs.Dispose ();
			rs.Dispose ();
		}
		public void GetEnumerator_Disposed ()
		{
			CloneResourceSet rs = new CloneResourceSet (new ClonableObject ());
			rs.Dispose ();
			try {
				rs.GetEnumerator ();
				Assert.Fail ("#1");
#if NET_2_0
			} catch (ObjectDisposedException ex) {
				// Cannot access a closed resource set
				Assert.AreEqual (typeof (ObjectDisposedException), ex.GetType (), "#2");
				Assert.IsNull (ex.InnerException, "#3");
				Assert.IsNotNull (ex.Message, "#4");
			}
#else
			} catch (InvalidOperationException ex) {