Exemplo n.º 1
0
        public void DataFlowElementConstructorTest1Value()
        {
            string          name   = "name";
            DataFlowElement target = new DataFlowElement(name);

            Assert.AreEqual(name, target.Name);
        }
Exemplo n.º 2
0
        public void GetHashCodeTest()
        {
            DataFlowElement dataFlowElement;

            dataFlowElement = new DataFlowElement("name", "tag");
            Assert.AreEqual("name".GetHashCode(), dataFlowElement.GetHashCode());
        }
Exemplo n.º 3
0
        public void ToStringTest()
        {
            DataFlowElement dataFlowElement;

            dataFlowElement = new DataFlowElement("name", "tag");
            Assert.AreEqual <string>("name", dataFlowElement.ToString());
        }
Exemplo n.º 4
0
        public void ToStringTest()
        {
            DataFlowElement target   = new DataFlowElement("Hello There");
            string          expected = "Hello There";
            string          actual;

            actual = target.ToString();
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 5
0
        public void GetHashCodeTest()
        {
            DataFlowElement target   = new DataFlowElement("Hello");
            int             expected = "Hello".GetHashCode();
            int             actual;

            actual = target.GetHashCode();
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 6
0
        public void CloneTest()
        {
            DataFlowElement target = new DataFlowElement("Hello");
            DataFlowElement actual;

            actual = target.Clone();
            Assert.IsNotNull(actual);
            Assert.AreEqual("Hello", actual.Name);
        }
Exemplo n.º 7
0
        public void DataFlowElementTest2()
        {
            DataFlowElement dataFlowElement;

            dataFlowElement = new DataFlowElement("name", "tag");
            Assert.IsNotNull((object)dataFlowElement);
            Assert.AreEqual <string>("name", dataFlowElement.Name);
            Assert.AreEqual("tag", dataFlowElement.Tag);
        }
Exemplo n.º 8
0
        public void DataFlowElementTest()
        {
            DataFlowElement dataFlowElement;

            dataFlowElement = new DataFlowElement();
            Assert.IsNotNull((object)dataFlowElement);
            Assert.IsNull(dataFlowElement.Name);
            Assert.IsNull(dataFlowElement.Tag);
        }
Exemplo n.º 9
0
        public void TagTest()
        {
            IDTSExternalMetadataColumn100 ic = new ExternalMetadataColumnTestImpl();
            DataFlowElement target           = new DataFlowElement("Name Me Please", ic);
            object          actual;

            actual = target.Tag;
            Assert.IsNotNull(actual);
            Assert.AreEqual(ic.Name, (actual as IDTSExternalMetadataColumn100).Name);
        }
Exemplo n.º 10
0
        public void NameTest()
        {
            DataFlowElement target   = new DataFlowElement("No Name");
            string          expected = "New Name";
            string          actual;

            target.Name = expected;
            actual      = target.Name;
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 11
0
        /// <summary>
        /// Creates an exact copy
        /// </summary>
        /// <returns>a copy of the Element</returns>
        public DataFlowElement Clone()
        {
            DataFlowElement newObject = new DataFlowElement();

            newObject.name    = this.name;
            newObject.tag     = this.tag;
            newObject.toolTip = this.toolTip;

            return(newObject);
        }
Exemplo n.º 12
0
        public void ToolTipTest()
        {
            IDTSExternalMetadataColumn100 ic = new ExternalMetadataColumnTestImpl();

            ic.Name = "name";
            string          expected = "Name: name\nData type: DT_NULL\nLength: 0\nScale: 0\nPrecision: 0\nCode page: 0";
            DataFlowElement target   = new DataFlowElement("New Name", ic); // TODO: Initialize to an appropriate value
            string          actual;

            actual = target.ToolTip;
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 13
0
        public void DataFlowElementConstructorTest2Value()
        {
            string name = "name"; // TODO: Initialize to an appropriate value
            IDTSExternalMetadataColumn100 ic = new ExternalMetadataColumnTestImpl();

            ic.Name = "name";
            string          expected = "Name: name\nData type: DT_NULL\nLength: 0\nScale: 0\nPrecision: 0\nCode page: 0";
            DataFlowElement target   = new DataFlowElement(name, ic);

            Assert.AreEqual(name, target.Name);
            Assert.AreEqual(ic, target.Tag);
            Assert.AreEqual(expected, target.ToolTip);
        }
Exemplo n.º 14
0
        public void CloneTest()
        {
            DataFlowElement dataFlowElement;
            DataFlowElement dataFlowElement1;

            dataFlowElement  = new DataFlowElement("name", "tag");
            dataFlowElement1 = dataFlowElement.Clone();
            Assert.IsNotNull((object)dataFlowElement1);
            Assert.AreEqual <string>("name", dataFlowElement1.Name);
            Assert.AreEqual("tag", dataFlowElement1.Tag);
            Assert.AreEqual <string>("", dataFlowElement1.ToolTip);
            Assert.IsNotNull((object)dataFlowElement);
            Assert.AreEqual <string>("name", dataFlowElement.Name);
            Assert.AreEqual("tag", dataFlowElement.Tag);
            Assert.AreEqual <string>("", dataFlowElement.ToolTip);
        }
Exemplo n.º 15
0
        public void DataFlowElementConstructorTestDefault()
        {
            DataFlowElement target = new DataFlowElement();

            Assert.IsNotNull(target);
        }