public void have_at_least_one_workspace() { var writer = XmlWriter.Create(new MemoryStream()); var doc = new ServiceDocument(); Assert.Throws <AtomSpecificationViolationException>(() => doc.WriteXml(writer)); writer.Close(); }