Beispiel #1
0
        public async void Update_Ad_Test()
        {
            Advertisement _ad = _advertisementGenerator.GenerateSingleAd("Teste Update");

            var mockAd = GetMockAd();

            mockAd.Setup(x => x.Update(_ad)).ReturnsAsync(true);

            var adController = new AdvertisementController(mockAd.Object);

            ActionResult result = await adController.Update(_ad);

            Assert.Equal(typeof(OkResult), result.GetType());
        }