Ejemplo n.º 1
0
        public static TflModel GoodMock()
        {
            TflModel model = new TflModel
            {
                Type                      = "Tfl.Api.Presentation.Entities.RoadCorridor, Tfl.Api.Presentation.Entities",
                Id                        = "a2",
                displayName               = "A@",
                statusSeverity            = "Good",
                statusSeverityDescription = "No Exceptional Delays",
                bounds                    = "[[-0.0857, 51.44091],[0.17118, 51.49438]]",
                envelope                  = "[[-0.0857,51.44091],[-0.0857,51.49438],[0.17118,51.49438],[0.17118,51.44091],[-0.0857,51.44091]]",
                url                       = "/Road/a2"
            };

            return(model);
        }
        // GET api/values/5
        public string GetGood(string id)
        {
            TflModel model = MockModel.GoodMock();

            return(JsonConvert.SerializeObject(model));
        }