public void v3_categories_should_accept_array() { var schema = GetNewznabSchemav3("Testv3array"); var categoriesField = GetCategoriesField(schema); categoriesField.Value = new object[] { 1000, 1010 }; var result = Indexersv3.Post(schema); var resultArray = GetCategoriesField(result).Value; resultArray.Should().BeOfType <JArray>(); resultArray.As <JArray>().ToObject <int[]>().Should().BeEquivalentTo(new[] { 1000, 1010 }); }
public void v3_categories_should_accept_emptystring() { var schema = GetNewznabSchemav3("Testv3emptystring"); var categoriesField = GetCategoriesField(schema); categoriesField.Value = ""; var result = Indexersv3.Post(schema); var resultArray = GetCategoriesField(result).Value; resultArray.Should().BeOfType <JArray>(); resultArray.As <JArray>().Should().BeEmpty(); }