Beispiel #1
0
        public void AddRatingToBeer()
        {
            PlunkApiController controller = new PlunkApiController();
            var response = controller.AddRatingToBeer(new BeerRating {
                UserName = "******", Rating = 5, BeerId = 2, Comments = "ttest"
            });

            Assert.IsTrue(response.TryGetContentValue(out string result));
            Assert.AreEqual("success", result);
        }
Beispiel #2
0
        public void GetAllBeers()
        {
            PlunkApiController controller = new PlunkApiController();
            var response = controller.GetAllBeers("Trashy Blonde");

            Assert.IsTrue(response.TryGetContentValue(out Beer beer));
            Assert.IsNotNull(beer);
            Assert.AreEqual("2", beer.Id);
            Assert.AreEqual("Trashy Blonde", beer.name);
        }