Example #1
0
        static ViewModelTestData()
        {
            MapBusStop = new MapBusStop
            {
                LongName  = "Long",
                ShortName = "Short",
                Id        = 1,
                Id2       = 2,
                Id3       = 3,
                Latitude  = 10.2,
                Longitude = -10.2,
                Buses     = new Dictionary <int, string>
                {
                    { 1, "as" },
                    { 2, "asd" }
                }
            };

            SimpleBusStop = new SimpleBusStop
            {
                Id    = 1,
                Id2   = 2,
                Name  = "Name",
                Title = "Title"
            };

            BusStopCollection = new BusStopCollection
            {
                Id             = 1,
                Title          = "Large Title",
                SimpleBusStops = new List <SimpleBusStop>
                {
                    SimpleBusStop, SimpleBusStop, SimpleBusStop
                }
            };
        }
Example #2
0
 private void Trim(SimpleBusStop model, int maxLength)
 {
     model.Title = model.Title.TrimToMaxLength(maxLength);
     model.Name  = model.Name.TrimToMaxLength(maxLength);
 }