public void TestTryProcess_RootWorks() {
			mocks.ReplayAll();
			var actual = new GenericElementProcessor().TryProcess(docProcessor, Globals.GetXmlNode("<div></div>"), true, template, renderFunction);
			Assert.AreEqual("<div id=\"[ID]\" style=\"[Position]\"></div>", ConcatenatedFragments);
			mocks.VerifyAll();
		}
		public void TestTryProcess_EmptyWithPotentialChildrenWorks() {
			Expect.Call(template.HasMember("a")).Return(false);
			Expect.Call(() => template.AddMember(new NamedElementMember("div", "a")));
			mocks.ReplayAll();
			var actual = new GenericElementProcessor().TryProcess(docProcessor, Globals.GetXmlNode("<div id=\"a\"></div>"), false, template, renderFunction);
			Assert.AreEqual("<div id=\"[ID]_a\"></div>", ConcatenatedFragments);
			mocks.VerifyAll();
		}
		public void TestTryProcess_InputNoTypeWorks() {
			var node = Globals.GetXmlNode("<input id=\"a\"/>");
		
			Expect.Call(template.HasMember("a")).Return(false);
			Expect.Call(() => template.AddMember(new NamedElementMember("input", "a")));
			mocks.ReplayAll();
			var actual = new GenericElementProcessor().TryProcess(docProcessor, node, false, template, renderFunction);
			Assert.AreEqual("<input id=\"[ID]_a\"/>", ConcatenatedFragments);
			mocks.VerifyAll();
		}
		public void TestTryProcess_InputWithNonLiteralTypeWorks() {
			var node = Globals.GetXmlNode("<input id=\"a\" type=\"{= Something}\"/>");
		
			Expect.Call(template.HasMember("a")).Return(false);
			Expect.Call(() => template.AddMember(new NamedElementMember("input", "a")));
			Expect.Call(docProcessor.ParseUntypedMarkup("{= Something}")).Return(new CodeFragment("Something", 0));
			mocks.ReplayAll();
			var actual = new GenericElementProcessor().TryProcess(docProcessor, node, false, template, renderFunction);
			Assert.AreEqual("<input id=\"[ID]_a\" type=\"[CODE:Something, indent=0]\"/>", ConcatenatedFragments);
			mocks.VerifyAll();
		}
		public void TestTryProcess_AttributesWorkForNonRoot() {
			var node = Globals.GetXmlNode("<div id=\"a\"><div id=\"b\">x</div><div id=\"c\">y</div></div>");
		
			Expect.Call(template.HasMember("a")).Return(false);
			Expect.Call(() => template.AddMember(new NamedElementMember("div", "a")));
			Expect.Call(() => docProcessor.ProcessRecursive(node.ChildNodes[0], template, renderFunction)).Do(new Action<XmlNode, ITemplate, IRenderFunction>((n, t, f) => f.AddFragment(new LiteralFragment("[B]"))));
			Expect.Call(() => docProcessor.ProcessRecursive(node.ChildNodes[1], template, renderFunction)).Do(new Action<XmlNode, ITemplate, IRenderFunction>((n, t, f) => f.AddFragment(new LiteralFragment("[C]"))));
			mocks.ReplayAll();
			var actual = new GenericElementProcessor().TryProcess(docProcessor, node, false, template, renderFunction);
			Assert.AreEqual("<div id=\"[ID]_a\">[B][C]</div>", ConcatenatedFragments);
			mocks.VerifyAll();
		}