예제 #1
0
 public void SubjectUpdate()
 {
     var subject = new ENSubject().Read(1);
     var oldName = subject.Name;
     subject.Name = "testUpdateName";
     subject.Save();
     var actual = subject.Read(1);
     var actualName = subject.Name;
     actual.Name = oldName;
     actual.Save();
     Assert.AreEqual("testUpdateName", actualName);
 }
예제 #2
0
 public void BookInsert()
 {
     var book = new ENBook();
     book.IdBook = "testInsertID";
     book.Name = "testInsertName";
     var testSubject = new ENSubject();
     testSubject = testSubject.Read(1);
     book.Subject = testSubject;
     book.Bussiness = (new ENBusiness()).Read(1);
     book.Save();
     var bookList = book.ReadAll();
     var actual = bookList[bookList.Count - 1];
     actual.Delete();
     Assert.AreEqual("testInsertID", actual.IdBook);
 }