public void TestMethod1()
        {
            PersonBs test = new PersonBs();
            string connectionString = "Data Source=MESKAI-PC;Initial Catalog=Test;Integrated Security=True";
            Person p = new Person();
            p.Name = "testname";

            MsSqlServerConnection con = new MsSqlServerConnection(connectionString, true);
            DataManager target = new DataManager(con); // TODO: Initialize to an appropriate value
            //test.Insert(p);
        }
 public void SelectListTest()
 {
     string connectionString = "Data Source=MESKAI-PC;Initial Catalog=Test;Integrated Security=True";
     MsSqlServerConnection connection = new MsSqlServerConnection(connectionString, true);
     DataManager manager = new DataManager(connection);
     Person p = new Person();
     List<Person> liste = new List<Person>();
     p.Name = "Can";
     liste = manager.SelectObjectList<Person>(p);
     Assert.AreEqual(3, liste.Count);
 }
        public void TransactionTest()
        {
            MsSqlServerConnection connection = new MsSqlServerConnection(connectionString, true);
            DataManager manager = new DataManager(connection);
            Person p = new Person();
            Person2 p2 = new Person2();
            try
            {
                manager.BeginTransaction();

                p.Age = 20;
                p.Name = "fatih";
                manager.Insert(p);
                throw new Exception("test");
                p2.Name = "can";
                p2.Age = p.PersonID;
                manager.Insert(p2);
                manager.CommitTransaction();

            }
            catch (Exception exc)
            {
                manager.RollbackTransaction();
            }
            finally
            {
                Assert.IsNotNull(p2.PersonID);
            }

        }
 public SqlServerDataManager(MsSqlServerConnection conn)
     : base(conn)
 {
     //SchemaValidator.TableValidator = new SqlServerTableValidator(this);//can kapattı
 }