public void TestReservePost() { //Arrange PostDB db = new PostDB(); //Act int n= db.ReservePost(1); //Assert Assert.AreEqual(1, n); }
public void TestUpdatePost() { //Arrange PostDB db = new PostDB(); //Act int n = db.updatePost(1, "meat", "details","7.356", "85230469", "Test124", "9685", DateTime.Today, false); //Assert Assert.AreEqual(1,n); }
public void TestsavePost() { //arrange PostDB db= new PostDB(); //Act db.savePost("TestType", "TestDetails", "5.32", "85230469", "Test124", "9685", DateTime.Now, false); //Asert Assert.IsNotNull(db.findPosts("TestType")); // return 0; }
public void TestLoadAllPosts() { // Arrange PostDB db = new PostDB(); List<Post> posts = new List<Post>(); //Act posts = db.LoadAllPosts(); // Assert Assert.IsTrue(posts.Count > 0); }
public void TestFindPosts() { //Arrange PostDB db = new PostDB(); List<Post> posts= new List<Post>(); //Act posts = db.findPosts("meat"); //Assert Assert.IsTrue(posts.Count>0); }
public void TestUnreserveAll() { PostDB db = new PostDB(); db.unreserveAll(); }
public void TestExpDate() { PostDB db = new PostDB(); int n= db.checkExpPosts(); Assert.AreEqual(1, n); }