예제 #1
0
        public void Ctor_InitializesManagerProperly_GivenNoParameters( )
        {
            var testee       = new KeyFilesManager( );
            var expectedPath = Path.GetDirectoryName(typeof(KeyFilesManager).Assembly.Location);

            testee.DefaultPath.Should( ).Be(expectedPath);
            testee.AdditionalPaths.Should( ).NotBeNull( );
            testee.FileExtensions.Should( ).BeEquivalentTo(KeyFilesManager.DefaultFileExtensions);
        }
        /// <summary>   Gets the key files manager for the current instance. </summary>
        /// <returns>   The key files manager. </returns>
        private IKeyFilesManager CreateKeyFilesManager( )
        {
            var manager = new KeyFilesManager( );

            // register additional paths to the manager
            if (this.AdditionalKeyPaths != null && this.AdditionalKeyPaths.Length > 0)
            {
                Array.ForEach(this.AdditionalKeyPaths, manager.AdditionalPaths.Add);
            }

            return(manager);
        }