public void AddsComment() { var comment = new Comment("Me", "You suck"); _blog.AddComment(comment); Assert.AreEqual(1, _blog.Comments.Count); }
public void TestClassBlog() { Blog b = new Blog(1, m, "Gratis airsoft geweren.", "Bij een aankoop van 10 eu gratis guns!", testDatumBirth1); Reactie r = new BlogReactie(1, k, "Mooie actie!", testGeplaatst, 1); //Testen van classe blog en daarbij het toevoegen van de comment: b.AddComment(r); Assert.AreEqual(b.ToString(), "Gratis airsoft geweren. door: [email protected] - Mario - Rechten - Bij een aankoop van 10 eu gratis guns!"); Assert.AreEqual(b.BlogID, 1); Assert.AreEqual(b.BlogID, r.ReactieID); Assert.AreEqual(b.DateUit, testDatumBirth1); Assert.AreEqual(b.Schrijver.Voornaam, m.Voornaam); Assert.AreEqual(b.Tekst, "Bij een aankoop van 10 eu gratis guns!"); Assert.AreEqual(b.Titel, "Gratis airsoft geweren."); //Testen van de classe reactie Assert.AreEqual(r.ReactieID, 1); Assert.AreEqual(r.Reactieuit, "Mooie actie!"); Assert.AreEqual(r.Datepost, testGeplaatst); Assert.AreEqual(r.SchijverKlant, k); Assert.AreEqual(r.ToString(), "Test: Mooie actie!"); }