public void FormGetWithId_NotFound() { // Arramge FormulierenController controller = GetController(); // Act HttpResponseMessage actionResult = controller.Get(-2); // Assert Assert.AreEqual(actionResult.StatusCode, HttpStatusCode.NotFound); }
public void FormGetWithId_Ok() { // Arramge FormulierenController controller = GetController(); // Act //How to determine wich id to pass? HttpResponseMessage actionResult = controller.Get(this.id); // Assert Assert.AreEqual(actionResult.StatusCode, HttpStatusCode.OK); }
public void FormDeleteWithId_NotFound() { // Arramge FormulierenController controller = GetController(); // Act //How to determine wich id to pass? HttpResponseMessage actionResult = controller.Get(-2); // Assert Assert.AreEqual(actionResult.StatusCode, HttpStatusCode.NotFound); }
public void FormGet_Ok() { // Arramge FormulierenController controller = GetController(); // Act HttpResponseMessage actionResult = controller.Get(); // Assert Assert.IsTrue(actionResult.TryGetContentValue(out List <Formulieren> formulier)); this.id = formulier.FirstOrDefault().Id; Assert.AreEqual(actionResult.StatusCode, HttpStatusCode.OK); }
public int GetFormulierenTemplateId() { FormulierenController formulierencontroller = new FormulierenController { Request = new System.Net.Http.HttpRequestMessage(), Configuration = new HttpConfiguration() }; // Act HttpResponseMessage actionResult = formulierencontroller.Get(); // Assert List <Formulieren> formulier; Assert.IsTrue(actionResult.TryGetContentValue <List <Formulieren> >(out formulier)); return(formulier.FirstOrDefault().Id); }