public void WhenParamIsNullResultNull() { var recommender = new Recommender(strngr); var comments = recommender.CommentsTo(null); Assert.IsNull(comments); }
public void WhenParamIsInvalidResultExeption() { var recommender = new Recommender(strngr); var prod = new Good() { }; Assert.Catch <NullReferenceException>(() => recommender.CommentsTo(product: prod)); }
public void WhenParamIsNotNullResultOK() { var recommender = new Recommender(strngr); var prod = new Good() { Product = new Preparation(), Supplier = new Supplier() }; var comments = recommender.CommentsTo(product: prod); Assert.NotNull(comments); }