public When_I_call_document_printer()
        {
            var fixture = new Fixture();
            document = fixture.Create<MergedDocument>();
            formattedDocument = fixture.Create<string>();

            documentFormatter = Substitute.For<IDocumentFormatter>();
            documentFormatter.DocumentToString(document).Returns(formattedDocument);

            printer = Substitute.For<IPrinter>();

            documentPrinter = new DocumentPrinter(documentFormatter, printer);

            // Act
            documentPrinter.Print(document);
        }
        public When_I_convert_a_document_to_string()
        {
            // Arrangement
            document = new Fixture().Create<MergedDocument>();
            document.Document.TokenizedDocument = "<<x>> <<y>> World";
            document.Document.GreetingToken = "<<x>>";
            document.Document.AdressToken = "<<y>>";

            personFormatter = Substitute.For<IPersonFormatter>();
            personFormatter.PersonToString(document.Person).Returns("Hello");

            addressFormatter = Substitute.For<IAddressFormatter>();
            addressFormatter.AddressToString(document.Person.Address).Returns("Wide");

            sut = new DocumentFormatter(addressFormatter, personFormatter);

            // Act
            actual = sut.DocumentToString(document);
        }
 public string DocumentToString(MergedDocument document)
 {
     // TODO read the document and replace any tokens using their respective formatter
     throw new NotImplementedException();
 }
 public void Print(MergedDocument document)
 {
     // TODO turn document into string, using the formatter, and print
     throw new NotImplementedException();
 }