public void RecordLoads_ShouldReturnNotFound() { ServersController controller = new ServersController(true); var actionResult = controller.RecordLoads(new CreateServerLoadDto() { ServerName = "NotAvailableServer", CpuLoad = 1.1, RamLoad = 1.1 }); Assert.IsInstanceOfType(actionResult, typeof(NotFoundResult)); }
public void RecordLoads_ShouldReturnOK() { ServersController controller = new ServersController(true); var actionResult = controller.RecordLoads(new CreateServerLoadDto() { ServerName = Global.Utility.NewServer, CpuLoad = 1.1, RamLoad = 1.1 }); Assert.IsInstanceOfType(actionResult, typeof(OkNegotiatedContentResult <CreateServerLoadDto>)); }