コード例 #1
0
        public ActionResult GetClients()
        {
            var ticks      = DateTime.Now.Ticks;
            var cityRouter = (int)(ticks % 2);

            var cityName = CityLookup.Lookup(cityRouter);

            return(View("ClientsView", new ClientsViewModel {
                CityName = cityName
            }));
        }
コード例 #2
0
        public void CityLookupTestSeattle()
        {
            var name = CityLookup.Lookup(3);

            Assert.AreEqual("Seattle", name);
        }
コード例 #3
0
        public void CityLookupTestWestLafayette()
        {
            var name = CityLookup.Lookup(2);

            Assert.AreEqual("West Lafayette", name);
        }
コード例 #4
0
        public void CityLookupTestLA()
        {
            var name = CityLookup.Lookup(1);

            Assert.AreEqual("Los Angeles", name);
        }