public void AddToDirectory_ShouldGetCorrectBoolean() { //Arrange StreamingContent content = new StreamingContent();//creating new instance of the streamingContent named content //create instance of our repository so we can test that we can calll that instance StreamingContentRepoistory repo = new StreamingContentRepoistory(); // creates new streaming content repoistory named repo //Act bool addResult = repo.AddContentToDirectory(content); //Assert Assert.IsTrue(addResult); }
public void GetContents_ShouldReturnContents() { //Arrange StreamingContent content = new StreamingContent(); // new instance StreamingContentRepoistory repo = new StreamingContentRepoistory(); // new instance of repository repo.AddContentToDirectory(content); //ACT List <StreamingContent> contents = repo.GetContents(); bool directoryHasContent = contents.Contains(content); //Assert Assert.IsTrue(directoryHasContent); }
public void Arrange() { _repo = new StreamingContentRepoistory(); // this field _repo has all the methods available to us, which we set up in the repository _content = new StreamingContent("Mr. Right", "Hitman falls in love", MaturityRating.R, 55.5, GenreType.Action); // the field _content is given all the same values of the the new instance of streaming content so the field _content(string title="Mr. Right", string description="Hitman Falls in love",MaturityRating =MaturityRating.R, double rating = 55.5, GenreType genre = GenreType.Action) _repo.AddContentToDirectory(_content); //this adds sll of our streamingContent values to our repository // the content _content are now within callable in our repository }