public void RecordLike_IfNotAlreadyLiked() { Subscriber sub = new Subscriber(); Video vid1 = new Video(); vid1.SetNumberOfLikes(10); vid1.SetVideoTitle("Vid001"); int expected = 11; if (!(sub.getVideosLiked().Contains(vid1.GetVideoTitle()))) { sub.RecordLike(vid1); } int actual = vid1.GetNumberOfLikes(); Assert.AreEqual(expected, actual, 0, "The Like Was Not Recorded"); }
public void RecordLike_IfAlreadyLiked() { Subscriber sub = new Subscriber(); Video vid = new Video(); vid.SetNumberOfLikes(10); vid.SetVideoTitle("Vid001"); sub.addToVideosLiked("Vid001"); int expected = 11; List<String> videosLiked = sub.getVideosLiked(); if(videosLiked.Contains(vid.GetVideoTitle())) { sub.RecordLike(vid); } int actual = vid.GetNumberOfLikes(); Assert.AreEqual(expected, actual, 0, "The Like Was Successfully Recorded"); }
public void IsPasswordCompliant_IfCorrectInput() { Subscriber sub = new Subscriber(); Assert.IsTrue(sub.IsPasswordCompliant("Password1")); }
public void IsPasswordCompliant_IfNoLowerCase() { Subscriber sub = new Subscriber(); Assert.IsFalse(sub.IsPasswordCompliant("PASSWORD")); }
public void IsPasswordCompliant_IfNoUpperCase() { Subscriber sub = new Subscriber(); Assert.IsFalse(sub.IsPasswordCompliant("password1")); }
public void IsPasswordCompliant_IfMissingDigit() { Subscriber sub = new Subscriber(); Assert.IsFalse(sub.IsPasswordCompliant("Password")); }
public void IsPasswordCompliant_IfLengthLessThan8() { Subscriber sub = new Subscriber(); Assert.IsFalse(sub.IsPasswordCompliant("Pass1")); }