Ejemplo n.º 1
0
        public void RsTargetConnectorConnectInvalidProviderTest()
        {
            //change the provider information to an invalid type
            _connectionProperties.Remove("Provider");
            _connectionProperties.Add("Provider", InvalidPropertyValue);

            //call the connect method from the connector and pass in the connection properties dictionary
            _rsTargetConnector.Connect(_connectionProperties);
        }
Ejemplo n.º 2
0
        public void RsTargetConnectorConnectionValidTest()
        {
            //create a new instance of the sample connector
            RS_TargetConnector rsTargetConnector = new RS_TargetConnector();

            //call the connect method from the connector and pass in the connection properties dictionary
            rsTargetConnector.Connect(_connectionProperties);

            //do a check that the IsConnected flag is true ad the connection has been opened
            Assert.IsTrue(rsTargetConnector.IsConnected);
        }
        public void RsTargetConnectorDisconnectValidTest()
        {
            //create a new instance of the sample connector
            RS_TargetConnector rsTargetConnector = new RS_TargetConnector();

            //call the connect method from the connector and pass in the connection properties dictionary
            rsTargetConnector.Connect(_connectionProperties);

            //do a check that the IsConnected flag is true
            Assert.IsTrue(rsTargetConnector.IsConnected);

            //call the disconnect method from the connector
            rsTargetConnector.Disconnect();

            //do a check the connector IsConnected flag is false
            Assert.IsFalse(rsTargetConnector.IsConnected);
        }