public void ParseDimensionFilterTest() { URLParameterDefaultImpl target = new URLParameterDefaultImpl(); string dimensionFilter = "1,1,2,3"; DimensionFilter expected = new DimensionFilter { DimensionID = "1", AttributeIDs = new List<string> { "1", "2", "3" } }; DimensionFilter actual = target.ParseDimensionFilter(dimensionFilter); Assert.AreEqual(expected, actual); }
public void ParseDimensionFilterListTest() { URLParameterDefaultImpl target = new URLParameterDefaultImpl(); string dimensionsFilter = "1,1,2,3,4#2,1,2,3,4"; IEnumerable<DimensionFilter> expected = new List<DimensionFilter> { new DimensionFilter { DimensionID = "1", AttributeIDs= new List<string> { "1", "2", "3", "4" } }, new DimensionFilter { DimensionID = "2", AttributeIDs= new List<string> { "1", "2", "3", "4" } } }; IEnumerable<DimensionFilter> actual = target.ParseDimensionFilterList(dimensionsFilter); Assert.IsTrue(Enumerable.SequenceEqual<DimensionFilter>(expected, actual)); }
public void URLParameterDefaultImplConstructorTest() { URLParameterDefaultImpl target = new URLParameterDefaultImpl(); Assert.AreNotEqual(null, target); }