public void CSUStyleTests(string json, List <Style> expected) { RuleJsonSerializer ruleJsonSerializer = new RuleJsonSerializer(); List <Rule> rules = ruleJsonSerializer.ParseJson(json); StyleFactory styleFactory = new StyleFactory(); List <Style> result = styleFactory.GenerateStyles(rules); Assert.Equal(result.Count, expected.Count); for (int i = 0; i < result.Count; i += 1) { output.WriteLine(expected[i].OuterXml); output.WriteLine(result[i].OuterXml); Assert.Equal(result[i].OuterXml, expected[i].OuterXml); } }