public void AppSortTest() { // get test Assert.That(AppSort.PopularToday.ToString(), Is.EqualTo("popular_today")); Assert.That(AppSort.Visitors.ToString(), Is.EqualTo("visitors")); Assert.That(AppSort.CreateDate.ToString(), Is.EqualTo("create_date")); Assert.That(AppSort.GrowthRate.ToString(), Is.EqualTo("growth_rate")); Assert.That(AppSort.PopularWeek.ToString(), Is.EqualTo("popular_week")); // parse test Assert.That(AppSort.FromJson("popular_today"), Is.EqualTo(AppSort.PopularToday)); Assert.That(AppSort.FromJson("visitors"), Is.EqualTo(AppSort.Visitors)); Assert.That(AppSort.FromJson("create_date"), Is.EqualTo(AppSort.CreateDate)); Assert.That(AppSort.FromJson("growth_rate"), Is.EqualTo(AppSort.GrowthRate)); Assert.That(AppSort.FromJson("popular_week"), Is.EqualTo(AppSort.PopularWeek)); }