public void TestSettings_with_SpecialFolder_Style()
        {
            const string username         = "******";
            const string password         = "******";
            const string connectionString = @"special={ApplicationData}\application\NLog.db";

            //Note - **user** should be updated to your userid before running this test.
            const string resultCS       = @"C:\Users\**user**\AppData\Roaming\application\NLog.db";
            const string connectionName = "litedb";
            const string collectionName = "loggerName";

            var target = new LiteDBTarget
            {
                UserName         = username,
                Password         = password,
                ConnectionString = connectionString,
                ConnectionName   = connectionName,
                CollectionName   = collectionName
            };


            target.UserName
            .Should().Be(username);
            target.Password
            .Should().Be(password);
            target.ConnectionString
            .Should().Be(resultCS);
            target.ConnectionName
            .Should().Be(connectionName);
            target.CollectionName
            .Should().Be(collectionName);
        }
        public void Init()
        {
            //get all the targets
            _targets = LogManager.Configuration.AllTargets.ToList();

            foreach (var target in _targets)
            {
                if (target.Name == "path")
                {
                    _pathTarget = target as LiteDBTarget;
                }
                if (target.Name == "special")
                {
                    _specialTarget = target as LiteDBTarget;
                }
                if (target.Name == "file")
                {
                    _fileTarget = target as LiteDBTarget;
                }
                if (target.Name == "legacy")
                {
                    _legacyTarget = target as LiteDBTarget;
                }
            }
        }
        public void TestSettings_with_path_Style()
        {
            const string username         = "******";
            const string password         = "******";
            const string connectionString = @"path=c:\temp\NLog.db";
            const string resultCS         = @"filename=c:\temp\NLog.db";
            const string connectionName   = "litedb";
            const string collectionName   = "loggerName";

            var target = new LiteDBTarget
            {
                UserName         = username,
                Password         = password,
                ConnectionString = connectionString,
                ConnectionName   = connectionName,
                CollectionName   = collectionName
            };


            target.UserName
            .Should().Be(username);
            target.Password
            .Should().Be(password);
            target.ConnectionString
            .Should().Be(resultCS);
            target.ConnectionName
            .Should().Be(connectionName);
            target.CollectionName
            .Should().Be(collectionName);
        }
        public void TestSettings()
        {
            const string username         = "******";
            const string password         = "******";
            const string connectionString = "some file name";
            const string connectionName   = "litedb";
            const string collectionName   = "loggerName";

            var target = new LiteDBTarget
            {
                UserName         = username,
                Password         = password,
                ConnectionString = connectionString,
                ConnectionName   = connectionName,
                CollectionName   = collectionName
            };


            target.UserName
            .Should().Be(username);
            target.Password
            .Should().Be(password);
            target.ConnectionString
            .Should().Be(connectionString);
            target.ConnectionName
            .Should().Be(connectionName);
            target.CollectionName
            .Should().Be(collectionName);
        }