public void deleteC() { _sample = new NHibernateSample.Data.NHibernateSample(typeof(Customer)); var tempcm = _sample.GetCustomerById(16); _sample.delete(tempcm); Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsFalse(_sample.GetCustomerById(16)!=null); }
public void deleteF() { _sample2 = new NHibernateSample.Data.NHibernateSample(typeof(file)); var tempfl = _sample2.GetFileById(7); _sample2.delete(tempfl); Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsFalse(_sample2.GetFileById(7) != null); }
public void deleteC() { _sample = new NHibernateSample.Data.NHibernateSample(typeof(Customer)); var tempcm = _sample.GetCustomerById(16); _sample.delete(tempcm); Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsFalse(_sample.GetCustomerById(16) != null); }
public void GetfileByIdTest() { _sample2 = new NHibernateSample.Data.NHibernateSample(typeof(file)); var tempfile = new file {id = 16, title = "Javahomework" }; _sample2.CreatFile(tempfile); file fl = _sample2.GetFileById(16); int fileId = fl.id; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(16, fileId); }
public void updateFtext() { _sample2 = new NHibernateSample.Data.NHibernateSample(typeof(file)); file fl = _sample2.GetFileById(16); fl.changetext("敏捷好讨厌!"); string text = _sample2.GetFileById(16).text; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual("敏捷好讨厌!", text); }
public void updateFtype() { _sample2 = new NHibernateSample.Data.NHibernateSample(typeof(file)); file fl = _sample2.GetFileById(12); fl.changetype("study"); string type = _sample2.GetFileById(12).type; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual("study", type); }
public void updateFname() { _sample2 = new NHibernateSample.Data.NHibernateSample(typeof(file)); file fl = _sample2.GetFileById(11); _sample2.changename(fl, "文件snoopy"); string name = _sample2.GetFileById(11).title; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual("文件snoopy", name); }
public void updateCname() { _sample = new NHibernateSample.Data.NHibernateSample(typeof(Customer)); Customer cm = _sample.GetCustomerById(1); _sample.changename(cm, "混蛋"); string name = _sample.GetCustomerById(1).name; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual("混蛋", name); }
public void GetCustomerByIdTest() { _sample = new NHibernateSample.Data.NHibernateSample(typeof(Customer)); var tempCutomer = new Customer { id=16,name = "永京" }; _sample.CreateCustomer(tempCutomer); Customer customer = _sample.GetCustomerById(1); int customerId = customer.id; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(1, customerId); }
public void insertCustomer() { _sample = new NHibernateSample.Data.NHibernateSample(typeof(Customer)); var tempCutomer = new Customer { id = 36, name = "永京", password = "******" }; _sample.CreateCustomer(tempCutomer); Customer cm = _sample.GetCustomerById(36); string name = cm.name; string password = cm.password; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual("永京", name); Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual("minjie", password); }
public void updateFtime() { _sample2 = new NHibernateSample.Data.NHibernateSample(typeof(file)); DateTime dt = DateTime.Now; file fl = _sample2.GetFileById(16); fl.changetime(); DateTime time = _sample2.GetFileById(16).time; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(dt, time); }
public void GetfileByIdTest() { _sample2 = new NHibernateSample.Data.NHibernateSample(typeof(file)); var tempfile = new file { id = 16, title = "Javahomework" }; _sample2.CreatFile(tempfile); file fl = _sample2.GetFileById(16); int fileId = fl.id; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(16, fileId); }
public void GetCustomerByIdTest() { _sample = new NHibernateSample.Data.NHibernateSample(typeof(Customer)); //this will be delete at the deleteC method in the end //so that it will success the next time run this whole TEST var tempCutomer = new Customer { id=16,name = "永京" }; _sample.CreateCustomer(tempCutomer); Customer customer = _sample.GetCustomerById(1); int customerId = customer.id; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(1, customerId); }
public void GetCustomerByIdTest() { _sample = new NHibernateSample.Data.NHibernateSample(typeof(Customer)); var tempCutomer = new Customer { id = 16, name = "永京" }; _sample.CreateCustomer(tempCutomer); Customer customer = _sample.GetCustomerById(1); int customerId = customer.id; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(1, customerId); }
public void insertFile() { _sample2 = new NHibernateSample.Data.NHibernateSample(typeof(file)); var tempFile = new file { id = 18, title = "week1-Java", type = "study", time = DateTime.Now, text = "Programming" }; _sample2.CreatFile(tempFile); file fl = _sample2.GetFileById(18); string title = fl.title; string type = fl.type; DateTime time = fl.time; string text = fl.text; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual("week1-Java", title); Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual("study", type); //Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(DateTime.Now, time); Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual("Programming", text); }
public void GetfileByIdTest() { _sample2 = new NHibernateSample.Data.NHibernateSample(typeof(file)); //this will be delete at the deleteF1 method in the end //so that it will success the next time run this whole TEST var tempfile = new file {id = 16, title = "Javahomework" }; _sample2.CreatFile(tempfile); file fl = _sample2.GetFileById(16); int fileId = fl.id; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(16, fileId); }
public void TestFixtureSetupC() { _sample = new NHibernateSample.Data.NHibernateSample(typeof(Customer)); }
public void TestFixtureSetupF() { _sample2 = new NHibernateSample.Data.NHibernateSample(typeof(file)); }
public void updateFname() { _sample2 = new NHibernateSample.Data.NHibernateSample(typeof(file)); file fl= _sample2.GetFileById(11); _sample2.changename(fl,"文件snoopy"); string name = _sample2.GetFileById(11).title; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual("文件snoopy", name); }
public void updateCpass() { _sample = new NHibernateSample.Data.NHibernateSample(typeof(Customer)); Customer cm = _sample.GetCustomerById(22); _sample.changepassword(cm,"skyisblue"); string password = _sample.GetCustomerById(22).password; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual("skyisblue", password); }