Пример #1
0
        public void AddFormat_ExpectedParameters_Ok()
        {
            formatDataAccess.Add(format);
            Format obtained = formatDataAccess.Get(format.Id);

            Assert.AreEqual(format, obtained);
        }
        public string GenerateHTML(Guid document, Guid format)
        {
            if (!DocumentDataAccess.Exists(document))
            {
                throw new ArgumentException("The document argument not exist in database."
                                            , "document");
            }

            if (!FormatDataAccess.Exists(format))
            {
                throw new ArgumentException("The format argument not exist in database."
                                            , "format");
            }

            HtmlGenerator Printer = new HtmlGenerator();

            Document doc  = DocumentDataAccess.Get(document);
            Format   form = FormatDataAccess.Get(format);

            return(Printer.Generate(doc, form));
        }