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

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

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

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

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

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

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

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

            Assert.IsNotNull(target);
        }