public void AddVideo_Success_Test() { // Arrange var repo = new JsonVideoRepository(); var video = MakeTestVideo(); // Act repo.Add(video); var result = repo.GetVideo(video.VideoUrl); // Assert Assert.Equal(video, result); }
public void GetVideo_Null_Test() { // Arrange var repo = new JsonVideoRepository(); var video = MakeTestVideo(); repo.Add(video); // Act var result = repo.GetVideo("unknown"); // Assert Assert.Null(result); }
public void RemoveByUrl_Success_Test() { // Arrange var repo = new JsonVideoRepository(); var video = MakeTestVideo(); repo.Add(video); // Act repo.Remove(video.VideoUrl); var result = repo.GetVideo(video.VideoUrl); // Assert Assert.Null(result); }