コード例 #1
0
        public void TestJdbc()
        {
            // arrange
            mockDataFrameWriterProxy.Setup(m => m.Jdbc(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <Dictionary <string, string> >()));
            var          dataFrameWriter = new DataFrameWriter(mockDataFrameWriterProxy.Object);
            const string url             = "jdbc:subprotocol:subname";
            const string table           = "table";
            var          properties      = new Dictionary <string, string>()
            {
                { "autocommit", "false" }
            };

            // Act
            dataFrameWriter.Jdbc(url, table, properties);

            // Assert
            mockDataFrameWriterProxy.Verify(m => m.Jdbc(url, table, properties), Times.Once);
        }