Exemplo n.º 1
0
        public void CustomFormatterNodeDefaults()
        {
            CustomFormatterNode customFormatter = new CustomFormatterNode();

            Assert.AreEqual("Custom Formatter", customFormatter.Name);
            Assert.IsTrue(String.IsNullOrEmpty(customFormatter.Type));
        }
Exemplo n.º 2
0
        public void CustomFormatterNodeDefaults()
        {
            CustomFormatterNode customFormatter = new CustomFormatterNode();

            Assert.AreEqual("Custom Formatter", customFormatter.Name);
            Assert.IsNull(customFormatter.Type);
        }
Exemplo n.º 3
0
        public void CustomFormatterNodeInitTest()
        {
            CustomFormatterData data = new CustomFormatterData();
            CustomFormatterNode node = new CustomFormatterNode(data);

            GeneratedApplicationNode.Nodes.Add(node);
            Assert.AreSame(data, node.FormatterData);
        }
        public void CustomFormatterNodeTest()
        {
            string attributeKey               = "attKey";
            string attributeValue             = "attValue";
            string name                       = "some name";
            Type   type                       = typeof(BinaryLogFormatter);
            CustomFormatterNode formatterNode = new CustomFormatterNode();

            formatterNode.Attributes.Add(new EditableKeyValue(attributeKey, attributeValue));
            formatterNode.Name = name;
            formatterNode.Type = type.AssemblyQualifiedName;
            CustomFormatterData nodeData = (CustomFormatterData)formatterNode.FormatterData;

            Assert.AreEqual(name, nodeData.Name);
            Assert.AreEqual(type, nodeData.Type);
            Assert.AreEqual(attributeKey, nodeData.Attributes.AllKeys[0]);
            Assert.AreEqual(attributeValue, nodeData.Attributes[attributeKey]);
        }
        public void CustomFormatterDataTest()
        {
            string attributeKey      = "attKey";
            string attributeValue    = "attValue";
            string name              = "some name";
            Type   type              = typeof(BinaryLogFormatter);
            CustomFormatterData data = new CustomFormatterData();

            data.Name = name;
            data.Type = type;
            data.Attributes.Add(attributeKey, attributeValue);
            CustomFormatterNode node = new CustomFormatterNode(data);

            Assert.AreEqual(name, node.Name);
            Assert.AreEqual(type.AssemblyQualifiedName, node.Type);
            Assert.AreEqual(attributeKey, node.Attributes[0].Key);
            Assert.AreEqual(attributeValue, node.Attributes[0].Value);
        }
Exemplo n.º 6
0
        public void CustomFormatterNodeTest()
        {
            NameValueItem testItem = new NameValueItem("TEST", "VALUE");
            string        name     = "testName";
            string        type     = "testType";

            CustomFormatterNode node = new CustomFormatterNode();

            GeneratedApplicationNode.Nodes.Add(node);
            node.Name     = name;
            node.TypeName = type;
            node.Attributes.Add(testItem);

            Assert.AreEqual(name, node.Name);
            Assert.AreEqual(type, node.TypeName);
            Assert.AreEqual(testItem, node.Attributes[0]);
            Assert.AreEqual(1, node.Attributes.Count);
        }
Exemplo n.º 7
0
        public void CustomFormatterDataTest()
        {
            NameValueItem testItem = new NameValueItem("TEST", "VALUE");
            string        name     = "testName";
            string        type     = "testType";

            CustomFormatterData data = new CustomFormatterData();

            data.Attributes.Add(testItem);
            data.TypeName = type;
            data.Name     = name;

            CustomFormatterNode node = new CustomFormatterNode(data);

            GeneratedApplicationNode.Nodes.Add(node);
            CustomFormatterData nodeData = (CustomFormatterData)node.FormatterData;

            Assert.AreEqual(testItem, nodeData.Attributes[0]);
            Assert.AreEqual(name, nodeData.Name);
            Assert.AreEqual(type, nodeData.TypeName);
        }