public void ClearAll() { var node = new OutputNode(typeof(Address)); node.UsesFormatter <XmlFormatter>(); node.UsesFormatter <JsonFormatter>(); node.ClearAll(); node.Writers.Any().ShouldBeFalse(); }
public void JsonOnly_with_existing_stuff() { var node = new OutputNode(typeof(Address)); node.UsesFormatter <XmlFormatter>(); node.JsonOnly(); node.Writers.ShouldHaveCount(1); node.UsesFormatter <JsonFormatter>().ShouldBeTrue(); }
public void JsonOnly_from_scratch() { var node = new OutputNode(typeof(Address)); node.JsonOnly(); node.Writers.ShouldHaveCount(1); node.UsesFormatter <JsonFormatter>().ShouldBeTrue(); }
public void UsesFormatter() { var node = new OutputNode(typeof(Address)); node.UsesFormatter <XmlFormatter>().ShouldBeFalse(); node.UsesFormatter <JsonFormatter>().ShouldBeFalse(); node.AddFormatter <XmlFormatter>(); node.UsesFormatter <XmlFormatter>().ShouldBeTrue(); node.UsesFormatter <JsonFormatter>().ShouldBeFalse(); node.AddFormatter <JsonFormatter>(); node.UsesFormatter <XmlFormatter>().ShouldBeTrue(); node.UsesFormatter <JsonFormatter>().ShouldBeTrue(); }
public void UsesFormatter() { var node = new OutputNode(typeof(Address)); node.UsesFormatter<XmlFormatter>().ShouldBeFalse(); node.UsesFormatter<JsonFormatter>().ShouldBeFalse(); node.AddFormatter<XmlFormatter>(); node.UsesFormatter<XmlFormatter>().ShouldBeTrue(); node.UsesFormatter<JsonFormatter>().ShouldBeFalse(); node.AddFormatter<JsonFormatter>(); node.UsesFormatter<XmlFormatter>().ShouldBeTrue(); node.UsesFormatter<JsonFormatter>().ShouldBeTrue(); }
public void JsonOnly_with_existing_stuff() { var node = new OutputNode(typeof(Address)); node.UsesFormatter<XmlFormatter>(); node.JsonOnly(); node.Writers.ShouldHaveCount(1); node.UsesFormatter<JsonFormatter>().ShouldBeTrue(); }
public void JsonOnly_from_scratch() { var node = new OutputNode(typeof(Address)); node.JsonOnly(); node.Writers.ShouldHaveCount(1); node.UsesFormatter<JsonFormatter>().ShouldBeTrue(); }
public void ClearAll() { var node = new OutputNode(typeof (Address)); node.UsesFormatter<XmlFormatter>(); node.UsesFormatter<JsonFormatter>(); node.ClearAll(); node.Writers.Any().ShouldBeFalse(); }