Exemple #1
0
        public void DataFlowElementConstructorTest1Value()
        {
            string          name   = "name";
            DataFlowElement target = new DataFlowElement(name);

            Assert.AreEqual(name, target.Name);
        }
Exemple #2
0
        public void GetHashCodeTest()
        {
            DataFlowElement dataFlowElement;

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

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

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

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

            actual = target.Clone();
            Assert.IsNotNull(actual);
            Assert.AreEqual("Hello", actual.Name);
        }
Exemple #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);
        }
Exemple #8
0
        public void DataFlowElementTest()
        {
            DataFlowElement dataFlowElement;

            dataFlowElement = new DataFlowElement();
            Assert.IsNotNull((object)dataFlowElement);
            Assert.IsNull(dataFlowElement.Name);
            Assert.IsNull(dataFlowElement.Tag);
        }
Exemple #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);
        }
Exemple #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);
        }
        /// <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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #15
0
        public void DataFlowElementConstructorTestDefault()
        {
            DataFlowElement target = new DataFlowElement();

            Assert.IsNotNull(target);
        }