public void Fill_Direct()
        {
            DataAdapter           da = new MyAdapter();
            DataSet               ds = new DataSet();
            NotSupportedException ex = Assert.Throws <NotSupportedException>(() => da.Fill(ds));

            // Specified method is not supported
            Assert.Null(ex.InnerException);
            Assert.NotNull(ex.Message);
        }
Exemple #2
0
		public void Fill_Direct ()
		{
			DataAdapter da = new MyAdapter ();
			DataSet ds = new DataSet ();
			try {
				da.Fill (ds);
				Assert.Fail ("#1");
			} catch (NotSupportedException ex) {
				// Specified method is not supported
				Assert.AreEqual (typeof (NotSupportedException), ex.GetType (), "#2");
				Assert.IsNull (ex.InnerException, "#3");
				Assert.IsNotNull (ex.Message, "#4");
			}
		}
Exemple #3
0
        public void Fill_Direct()
        {
            DataAdapter da = new MyAdapter();
            DataSet     ds = new DataSet();

            try {
                da.Fill(ds);
                Assert.Fail("#1");
            } catch (NotSupportedException ex) {
                // Specified method is not supported
                Assert.AreEqual(typeof(NotSupportedException), ex.GetType(), "#2");
                Assert.IsNull(ex.InnerException, "#3");
                Assert.IsNotNull(ex.Message, "#4");
            }
        }
Exemple #4
0
 public void Fill_Direct()
 {
     DataAdapter da = new MyAdapter();
     DataSet ds = new DataSet();
     try
     {
         da.Fill(ds);
         Assert.False(true);
     }
     catch (NotSupportedException ex)
     {
         // Specified method is not supported
         Assert.Equal(typeof(NotSupportedException), ex.GetType());
         Assert.Null(ex.InnerException);
         Assert.NotNull(ex.Message);
     }
 }
Exemple #5
0
        public void Fill_Direct()
        {
            DataAdapter da = new MyAdapter();
            DataSet     ds = new DataSet();

            try
            {
                da.Fill(ds);
                Assert.False(true);
            }
            catch (NotSupportedException ex)
            {
                // Specified method is not supported
                Assert.Equal(typeof(NotSupportedException), ex.GetType());
                Assert.Null(ex.InnerException);
                Assert.NotNull(ex.Message);
            }
        }