Exemple #1
0
        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();
 }
Exemple #3
0
 public Meassurement Delete(int id)
 {
     return(MeassurementFunctions.Delete(id));
 }
Exemple #4
0
 public Meassurement Post([FromBody] Meassurement m)
 {
     return(MeassurementFunctions.Add(m));
 }
Exemple #5
0
 public Meassurement Get(int id)
 {
     return(MeassurementFunctions.Get(id));
 }
Exemple #6
0
 [Route("Getall")] // husk at benytte den i url'en.
 public List <Meassurement> GetAll()
 {
     return(MeassurementFunctions.GetAll());
 }
Exemple #7
0
 public void TestGetOne()
 {
     MeassurementFunctions.GetConnection();
 }