public void TestGetAll() { MeassurementFunctions.GetConnection(); List <Meassurement> mlist = MeassurementFunctions.GetAll(); Assert.AreEqual(4, mlist.Count); //var GetAll = MeassurementFunctions.GetAll(); // var expected = 4; // var actual = GetAll; // Assert.AreEqual(expected, actual); }
public static void Main(string[] args) { MeassurementFunctions.GetConnection(); // Skal skrives i main, så den kaldes når programmet starter CreateWebHostBuilder(args).Build().Run(); }
public Meassurement Delete(int id) { return(MeassurementFunctions.Delete(id)); }
public Meassurement Post([FromBody] Meassurement m) { return(MeassurementFunctions.Add(m)); }
public Meassurement Get(int id) { return(MeassurementFunctions.Get(id)); }
[Route("Getall")] // husk at benytte den i url'en. public List <Meassurement> GetAll() { return(MeassurementFunctions.GetAll()); }
public void TestGetOne() { MeassurementFunctions.GetConnection(); }