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.FromJsonString("popular_today"), Is.EqualTo(AppSort.PopularToday)); Assert.That(AppSort.FromJsonString("visitors"), Is.EqualTo(AppSort.Visitors)); Assert.That(AppSort.FromJsonString("create_date"), Is.EqualTo(AppSort.CreateDate)); Assert.That(AppSort.FromJsonString("growth_rate"), Is.EqualTo(AppSort.GrowthRate)); Assert.That(AppSort.FromJsonString("popular_week"), Is.EqualTo(AppSort.PopularWeek)); }
public void AppSortTest() { // get test Assert.That(actual: AppSort.PopularToday.ToString(), expression: Is.EqualTo(expected: "popular_today")); Assert.That(actual: AppSort.Visitors.ToString(), expression: Is.EqualTo(expected: "visitors")); Assert.That(actual: AppSort.CreateDate.ToString(), expression: Is.EqualTo(expected: "create_date")); Assert.That(actual: AppSort.GrowthRate.ToString(), expression: Is.EqualTo(expected: "growth_rate")); Assert.That(actual: AppSort.PopularWeek.ToString(), expression: Is.EqualTo(expected: "popular_week")); // parse test Assert.That(actual: AppSort.FromJsonString(response: "popular_today"), expression: Is.EqualTo(expected: AppSort.PopularToday)); Assert.That(actual: AppSort.FromJsonString(response: "visitors"), expression: Is.EqualTo(expected: AppSort.Visitors)); Assert.That(actual: AppSort.FromJsonString(response: "create_date"), expression: Is.EqualTo(expected: AppSort.CreateDate)); Assert.That(actual: AppSort.FromJsonString(response: "growth_rate"), expression: Is.EqualTo(expected: AppSort.GrowthRate)); Assert.That(actual: AppSort.FromJsonString(response: "popular_week"), expression: Is.EqualTo(expected: AppSort.PopularWeek)); }