Beispiel #1
0
 public void EmptyMathMLRootTest()
 {
     Assert.AreEqual("<mroot></mroot>", _serializer.SerializeMathMLNode(new MathMLRoot()));
 }
 public void EmptyMathMLPaddedTest()
 {
     Assert.AreEqual("<mpadded></mpadded>", _serializer.SerializeMathMLNode(new MathMLPadded()));
 }
 public void EmptyMathMLSuperscriptTest()
 {
     Assert.AreEqual("<msup></msup>", _serializer.SerializeMathMLNode(new MathMLSuperscript()));
 }
 public void EmptyMathMLSpaceTest()
 {
     Assert.AreEqual("<mspace></mspace>", _serializer.SerializeMathMLNode(new MathMLSpace()));
 }
 public void EmptyMathMLNumberTest()
 {
     Assert.AreEqual("<mn></mn>", _serializer.SerializeMathMLNode(new MathMLNumber()));
 }
 public void EmptyMathMLEncloseTest()
 {
     Assert.AreEqual("<menclose notation=\"longdiv\"></menclose>", _serializer.SerializeMathMLNode(new MathMLEnclose()));
 }
 public void EmptyMathMLMultiscriptsTest()
 {
     Assert.AreEqual("<mmultiscripts></mmultiscripts>", _serializer.SerializeMathMLNode(new MathMLMultiscripts()));
 }
Beispiel #8
0
 public void EmptyMathMLLabeledTableRowTest()
 {
     Assert.AreEqual("<mlabeledtr></mlabeledtr>", _serializer.SerializeMathMLNode(new MathMLLabeledTableRow()));
 }
Beispiel #9
0
 public void EmptyMathMLOverTest()
 {
     Assert.AreEqual("<mover></mover>", _serializer.SerializeMathMLNode(new MathMLOver()));
 }
Beispiel #10
0
        public void YEqualsMXPlusCTest()
        {
            var math = new MathMLMath();

            var row = new MathMLRow();

            var identifier1 = new MathMLIdentifier();
            var textNode1   = new MathMLTextNode("y");

            identifier1.Children.Add(textNode1);

            var operator1 = new MathMLOperator();
            var textNode2 = new MathMLTextNode("=");

            operator1.Children.Add(textNode2);

            var identifier2 = new MathMLIdentifier();
            var textNode3   = new MathMLTextNode("m");

            identifier2.Children.Add(textNode3);

            var identifier3 = new MathMLIdentifier();
            var textNode4   = new MathMLTextNode("x");

            identifier3.Children.Add(textNode4);

            var operator2 = new MathMLOperator();
            var textNode5 = new MathMLTextNode("+");

            operator2.Children.Add(textNode5);

            var identifier4 = new MathMLIdentifier();
            var textNode6   = new MathMLTextNode("c");

            identifier4.Children.Add(textNode6);

            row.Children.Add(identifier1);
            row.Children.Add(operator1);
            row.Children.Add(identifier2);
            row.Children.Add(identifier3);
            row.Children.Add(operator2);
            row.Children.Add(identifier4);

            math.Children.Add(row);

            Assert.AreEqual("<math><mrow><mi>y</mi><mo>=</mo><mi>m</mi><mi>x</mi><mo>+</mo><mi>c</mi></mrow></math>", _serializer.SerializeMathMLNode(math));
        }
Beispiel #11
0
 public void EmptyMathMLTextNodeTest()
 {
     Assert.AreEqual("", _serializer.SerializeMathMLNode(new MathMLTextNode("")));
 }
Beispiel #12
0
 public void EmptyMathMLIdentifierTest()
 {
     Assert.AreEqual("<mi></mi>", _serializer.SerializeMathMLNode(new MathMLIdentifier()));
 }
Beispiel #13
0
 public void EmptyMathMLLongDivisionTest()
 {
     Assert.AreEqual("<mlongdiv></mlongdiv>", _serializer.SerializeMathMLNode(new MathMLLongDivision()));
 }
Beispiel #14
0
 public void EmptyMathMLTableTest()
 {
     Assert.AreEqual("<mtable></mtable>", _serializer.SerializeMathMLNode(new MathMLTable()));
 }
Beispiel #15
0
 public void EmptyMathMLGlyphTest()
 {
     Assert.AreEqual("<mglyph></mglyph>", _serializer.SerializeMathMLNode(new MathMLGlyph()));
 }
Beispiel #16
0
 public void EmptyMathMLTextTest()
 {
     Assert.AreEqual("<mtext></mtext>", _serializer.SerializeMathMLNode(new MathMLText()));
 }
 public void EmptyMathMLPhantomTest()
 {
     Assert.AreEqual("<mphantom></mphantom>", _serializer.SerializeMathMLNode(new MathMLPhantom()));
 }
 public void EmptyMathMLOperatorTest()
 {
     Assert.AreEqual("<mo></mo>", _serializer.SerializeMathMLNode(new MathMLOperator()));
 }
Beispiel #19
0
 public void EmptyMathMLTableCellTest()
 {
     Assert.AreEqual("<mtd></mtd>", _serializer.SerializeMathMLNode(new MathMLTableCell()));
 }
Beispiel #20
0
 public void EmptyMathMLFractionTest()
 {
     Assert.AreEqual("<mfrac></mfrac>", _serializer.SerializeMathMLNode(new MathMLFraction()));
 }