using System;
using System.IO;
using System.Linq;
using System.Xml;
using System.Collections.Generic;
using NUnit.Framework;
using Monodoc;
using Monodoc.Generators;
using Monodoc.Generators.Html;
namespace MonoTests.Monodoc.Generators
{
[TestFixture]
public class AvoidCDataTextReaderTest
{
void AssertSameInputOutput (string expected, string input)
{
var processed = new AvoidCDataTextReader (new StringReader (input)).ReadToEnd ();
Assert.AreEqual (expected, processed);
}
[Test]
public void NoCDataXmlTest ()
{
var input = @"Addressbook APIs.
Provides access to the system Address Book.
";
AssertSameInputOutput (input, input);
}
[Test]
public void WithCDataXmlTest ()
{
var input = @"Addressbook APIs.
";
AssertSameInputOutput (input.Replace ("", string.Empty), input);
}
[Test]
public void PartialCDataXmlTest ()
{
var input = @"Addressbook APIs.
";
AssertSameInputOutput (input, input);
}
[Test]
public void FinishWithPartialCDataXmlTest ()
{
var input = @"Addressbook APIs.
Provides access to the system Address Book.
Addressbook APIs.
Provides access to the system Address Book.