public void XmlSerializationTest() { var model = new BarSimple { String = "Bar string value!", someint = 6, SomeEnum = SomeEnum.Value2 }; var serializer = new DefaultModelXmlSerializer(); var result = serializer.Serialize(model); Assert.True(true); }
//BAR //GET api/bars/ public async Task <List <BarSimple> > GetBestBarList() { var stubList = new List <BarSimple>(); var bar1 = new BarSimple { BarName = "Barname", AvgRating = 5, ShortDescription = "This is Bar1", Image = "https://www.bigskyfishing.com/wordpress/wp-content/uploads/2018/03/two-med-lake-reflections-lead.jpg" }; stubList.Add(bar1); var bar2 = new BarSimple { BarName = "Bar2", AvgRating = 4, ShortDescription = "This is Bar2", Image = "https://www.xamarin.com/content/images/pages/forms/example-app.png" }; stubList.Add(bar2); return(stubList); }
//GET api/bars/worst public async Task <List <BarSimple> > GetWorstBarList() { var stubList = new List <BarSimple>(); var bar2 = new BarSimple { BarName = "Bar2", AvgRating = 4, ShortDescription = "This is Bar2", Image = "katrine.png" }; stubList.Add(bar2); var bar1 = new BarSimple { BarName = "Bar1", AvgRating = 5, ShortDescription = "This is Bar1", Image = "katrine.png" }; stubList.Add(bar1); return(stubList); }
//GET api/bars/{from}/{to} public async Task <List <BarSimple> > GetSpecificBarList(int startIndex, int pageSize) //Der er 5 barer { var stubList = new List <BarSimple>(); var bar1 = new BarSimple { BarName = "Bar1", AvgRating = 5, ShortDescription = "This is Bar1", Image = "katrine.png" }; stubList.Add(bar1); var bar2 = new BarSimple { BarName = "Bar2", AvgRating = 4, ShortDescription = "This is Bar2", Image = "katrine.png" }; stubList.Add(bar2); var bar3 = new BarSimple { BarName = "Bar3", AvgRating = 3, ShortDescription = "This is Bar3", Image = "katrine.png" }; stubList.Add(bar3); var bar4 = new BarSimple { BarName = "Bar4", AvgRating = 2, ShortDescription = "This is Bar4", Image = "katrine.png" }; stubList.Add(bar4); var bar5 = new BarSimple { BarName = "Bar5", AvgRating = 1, ShortDescription = "This is Bar5", Image = "katrine.png" }; stubList.Add(bar5); return(stubList.GetRange(startIndex, pageSize)); }
public Task TaskActionBarSimpleXml(BarSimple model) { throw new NotImplementedException(); }