Exemplo n.º 1
0
        public void AddToBatch()
        {
            MyAdapter da = new MyAdapter();

            try {
                da.AddToBatch(new SqlCommand());
                Assert.Fail("#1");
            } catch (NotSupportedException ex) {
                Assert.AreEqual(typeof(NotSupportedException), ex.GetType(), "#2");
                Assert.IsNull(ex.InnerException, "#3");
                Assert.IsNotNull(ex.Message, "#4");
            }
        }
Exemplo n.º 2
0
        public void AddToBatch()
        {
            MyAdapter da = new MyAdapter();

            try {
                da.AddToBatch(new SqlCommand());
                Assert.Fail("#1");
#if FEATURE_NO_BSD_SOCKETS
            } catch (PlatformNotSupportedException) {
#else
            } catch (NotSupportedException ex) {
                Assert.AreEqual(typeof(NotSupportedException), ex.GetType(), "#2");
                Assert.IsNull(ex.InnerException, "#3");
                Assert.IsNotNull(ex.Message, "#4");
#endif
            }
        }
Exemplo n.º 3
0
		public void AddToBatch ()
		{
			MyAdapter da = new MyAdapter ();
			try {
				da.AddToBatch (new SqlCommand ());
				Assert.Fail ("#1");
			} catch (NotSupportedException ex) {
				Assert.AreEqual (typeof (NotSupportedException), ex.GetType (), "#2");
				Assert.IsNull (ex.InnerException, "#3");
				Assert.IsNotNull (ex.Message, "#4");
			}
		}
Exemplo n.º 4
0
		public void AddToBatch ()
		{
			MyAdapter da = new MyAdapter ();
			try {
				da.AddToBatch (new SqlCommand ());
				Assert.Fail ("#1");
#if FEATURE_NO_BSD_SOCKETS
			} catch (PlatformNotSupportedException) {
#else
			} catch (NotSupportedException ex) {
				Assert.AreEqual (typeof (NotSupportedException), ex.GetType (), "#2");
				Assert.IsNull (ex.InnerException, "#3");
				Assert.IsNotNull (ex.Message, "#4");
#endif
			}
		}