Ejemplo n.º 1
0
		public void HeadContent_Should_Contain_Script_Tag_And_CDN_Src()
		{
			// Arrange
			string expectedScriptTag = "<script type=\"text/javascript\" src=\"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"></script>";
			MathJax mathjax = new MathJax();

			// Act
			string scriptTag = mathjax.GetHeadContent();

			// Assert
			Assert.That(scriptTag, Is.StringContaining(expectedScriptTag));
		}
Ejemplo n.º 2
0
		public void Should_Replace_Token_After_Parse()
		{
			// Arrange
			string expectedHtml = "<p> $$e=mc2$$</p>";
			MathJax mathjax = new MathJax();

			// Act
			string actualHtml = mathjax.AfterParse("<p>[[[mathjax]]] $$e=mc2$$</p>");

			// Assert
			Assert.That(actualHtml, Is.EqualTo(expectedHtml));
		}