Пример #1
0
        public void TestGetDefaultDatabaseFilePath()
        {
            var connectionBuilder = CreateTestConnectionStringBuilder();

            Assert.NotNull(connectionBuilder);

            string filePath = string.Empty;
            string logPath  = string.Empty;

            ReliableConnectionHelper.OpenConnection(
                connectionBuilder,
                usingConnection: (conn) =>
            {
                filePath = ReliableConnectionHelper.GetDefaultDatabaseFilePath(conn);
                logPath  = ReliableConnectionHelper.GetDefaultDatabaseLogPath(conn);
            },
                catchException: null,
                useRetry: false);

            Assert.False(string.IsNullOrWhiteSpace(filePath));
            Assert.False(string.IsNullOrWhiteSpace(logPath));
        }