public void TestAddAttributeFragments_StyleIsNotAddedIfExists() { Expect.Call(docProcessor.ParseUntypedMarkup("a: b")).Return(new LiteralFragment("a: b")); mocks.ReplayAll(); var context = new GenericElementProcessorContext(); GenericElementProcessor.AddAttributeFragments(docProcessor, Globals.GetXmlNode("<x style=\"a: b\"/>"), true, template, renderFunction, context); Assert.AreEqual(" style=\"a: b;[Position]\" id=\"[ID]\"", ConcatenatedFragments); mocks.VerifyAll(); }
public void TestAddAttributeFragments_RootAddsPositionAndStyle() { Expect.Call(docProcessor.ParseUntypedMarkup("val1")).Return(new LiteralFragment("val1")); Expect.Call(docProcessor.ParseUntypedMarkup("val2")).Return(new LiteralFragment("val2")); mocks.ReplayAll(); var context = new GenericElementProcessorContext(); GenericElementProcessor.AddAttributeFragments(docProcessor, Globals.GetXmlNode("<x attr1=\"val1\" attr2=\"val2\"/>"), true, template, renderFunction, context); Assert.AreEqual(" attr1=\"val1\" attr2=\"val2\" id=\"[ID]\" style=\"[Position]\"", ConcatenatedFragments); mocks.VerifyAll(); }