@@ -526,3 +526,138 @@ Describe "Get-SQLConnectionTestThreaded" {
526526 }
527527 }
528528}
529+
530+ Describe " Get-SQLFuzzDatabaseName" {
531+ It " Should return results for the local host" {
532+ if ( (Get-SQLFuzzDatabaseName | Measure-Object ).count -lt 1 ) {
533+ Throw " Incorrect fuzz database name results returned"
534+ }
535+ }
536+ It " Should accept -Instance argument" {
537+ if ( (Get-SQLFuzzDatabaseName - Instance $env: COMPUTERNAME | Measure-Object ).count -lt 1 ) {
538+ Throw " Incorrect fuzz database name results returned"
539+ }
540+ }
541+ It " Should accept -Username argument" {
542+ if ( (Get-SQLFuzzDatabaseName - Instance $env: COMPUTERNAME - Username test - Password test | Measure-Object ).count -lt 1 ) {
543+ Throw " Incorrect fuzz database name results returned"
544+ }
545+ }
546+ It " Should accept -Password argument" {
547+ if ( (Get-SQLFuzzDatabaseName - Instance $env: COMPUTERNAME - Username test - Password test | Measure-Object ).count -lt 1 ) {
548+ Throw " Incorrect fuzz database name results returned"
549+ }
550+ }
551+ It " Should accept -StartId and -EndId arguments" {
552+ if ( (Get-SQLFuzzDatabaseName - Instance $env: COMPUTERNAME - StartID 1 - EndId 500 | Measure-Object ).count -lt 1 ) {
553+ Throw " Incorrect fuzz database name results returned"
554+ }
555+ }
556+ It " Should accept pipeline input" {
557+ if ( ( Get-SQLInstanceLocal | Get-SQLFuzzDatabaseName | Measure-Object ).count -lt 1 ) {
558+ Throw " Incorrect fuzz database name results returned"
559+ }
560+ }
561+ }
562+
563+
564+ Describe " Get-SQLFuzzDomainAccount" {
565+ It " Should return results for the local host" {
566+ if ( (Get-SQLFuzzDomainAccount | Measure-Object ).count -lt 1 ) {
567+ Throw " Incorrect fuzz domain account name results returned"
568+ }
569+ }
570+ It " Should accept -Instance argument" {
571+ if ( (Get-SQLFuzzDomainAccount - Instance $env: COMPUTERNAME | Measure-Object ).count -lt 1 ) {
572+ Throw " Incorrect fuzz domain account name results returned"
573+ }
574+ }
575+ It " Should accept -Username argument" {
576+ if ( (Get-SQLFuzzDomainAccount - Instance $env: COMPUTERNAME - Username test - Password test | Measure-Object ).count -lt 1 ) {
577+ Throw " Incorrect fuzz domain account name results returned"
578+ }
579+ }
580+ It " Should accept -Password argument" {
581+ if ( (Get-SQLFuzzDomainAccount - Instance $env: COMPUTERNAME - Username test - Password test | Measure-Object ).count -lt 1 ) {
582+ Throw " Incorrect fuzz domain account name results returned"
583+ }
584+ }
585+ It " Should accept -StartId and -EndId arguments" {
586+ if ( (Get-SQLFuzzDomainAccount - Instance $env: COMPUTERNAME - StartID 500 - EndId 550 | Measure-Object ).count -lt 1 ) {
587+ Throw " Incorrect fuzz domain account name results returned"
588+ }
589+ }
590+ It " Should accept pipeline input" {
591+ if ( ( Get-SQLInstanceLocal | Get-SQLFuzzDomainAccount | Measure-Object ).count -lt 1 ) {
592+ Throw " Incorrect fuzz domain account name results returned"
593+ }
594+ }
595+ }
596+
597+
598+ Describe " Get-SQLFuzzObjectName" {
599+ It " Should return results for the local host" {
600+ if ( (Get-SQLFuzzObjectName | Measure-Object ).count -lt 1 ) {
601+ Throw " Incorrect fuzz object name results returned"
602+ }
603+ }
604+ It " Should accept -Instance argument" {
605+ if ( (Get-SQLFuzzObjectName - Instance $env: COMPUTERNAME | Measure-Object ).count -lt 1 ) {
606+ Throw " Incorrect fuzz object name results returned"
607+ }
608+ }
609+ It " Should accept -Username argument" {
610+ if ( (Get-SQLFuzzObjectName - Instance $env: COMPUTERNAME - Username test - Password test | Measure-Object ).count -lt 1 ) {
611+ Throw " Incorrect fuzz object name results returned"
612+ }
613+ }
614+ It " Should accept -Password argument" {
615+ if ( (Get-SQLFuzzObjectName - Instance $env: COMPUTERNAME - Username test - Password test | Measure-Object ).count -lt 1 ) {
616+ Throw " Incorrect fuzz object name results returned"
617+ }
618+ }
619+ It " Should accept -StartId and -EndId arguments" {
620+ if ( (Get-SQLFuzzObjectName - Instance $env: COMPUTERNAME - StartID 1 - EndId 50 | Measure-Object ).count -lt 1 ) {
621+ Throw " Incorrect fuzz object name results returned"
622+ }
623+ }
624+ It " Should accept pipeline input" {
625+ if ( ( Get-SQLInstanceLocal | Get-SQLFuzzObjectName | Measure-Object ).count -lt 1 ) {
626+ Throw " Incorrect fuzz object name results returned"
627+ }
628+ }
629+ }
630+
631+
632+ Describe " Get-SQLFuzzServerLogin" {
633+ It " Should return results for the local host" {
634+ if ( (Get-SQLFuzzServerLogin | Measure-Object ).count -lt 1 ) {
635+ Throw " Incorrect fuzz sql login name results returned"
636+ }
637+ }
638+ It " Should accept -Instance argument" {
639+ if ( (Get-SQLFuzzServerLogin - Instance $env: COMPUTERNAME | Measure-Object ).count -lt 1 ) {
640+ Throw " Incorrect fuzz sql login name results returned"
641+ }
642+ }
643+ It " Should accept -Username argument" {
644+ if ( (Get-SQLFuzzServerLogin - Instance $env: COMPUTERNAME - Username test - Password test | Measure-Object ).count -lt 1 ) {
645+ Throw " Incorrect fuzz sql login name results returned"
646+ }
647+ }
648+ It " Should accept -Password argument" {
649+ if ( (Get-SQLFuzzServerLogin - Instance $env: COMPUTERNAME - Username test - Password test | Measure-Object ).count -lt 1 ) {
650+ Throw " Incorrect fuzz sql login name results returned"
651+ }
652+ }
653+ It " Should accept -StartId and -EndId arguments" {
654+ if ( (Get-SQLFuzzServerLogin - Instance $env: COMPUTERNAME - StartID 1 - EndId 50 | Measure-Object ).count -lt 1 ) {
655+ Throw " Incorrect fuzz sql login name results returned"
656+ }
657+ }
658+ It " Should accept pipeline input" {
659+ if ( ( Get-SQLInstanceLocal | Get-SQLFuzzServerLogin | Measure-Object ).count -lt 1 ) {
660+ Throw " Incorrect fuzz sql login name results returned"
661+ }
662+ }
663+ }
0 commit comments