﻿Describe "Get-DbaDatabase Integration Tests" -Tags "Integrationtests" {

    Context "Count system databases on localhost" {
        $results = Get-DbaDatabase -SqlInstance localhost -NoUserDb 
        It "Should report the right number of databases" {
            $results.Count | Should Be 4
        }
    }

    Context "Check that master database is in Simple recovery mode" {
            $results = Get-DbaDatabase -SqlInstance localhost -Database master
            It "Should say the recovery mode of master is Simple" {
                $results.RecoveryModel | Should Be "Simple"
            }
        }
}

﻿Describe "Get-DbaDatabase Integration Tests" -Tags "Integrationtests" {

	Context "Count system databases on localhost" {
		$results = Get-DbaDatabase -SqlInstance localhost -NoUserDb 
		It "Should report the right number of databases" {
			$results.Count | Should Be 4
		}
	}

	Context "Check that master database is in Simple recovery mode" {
		$results = Get-DbaDatabase -SqlInstance localhost -Database master
		It "Should say the recovery mode of master is Simple" {
			$results.RecoveryModel | Should Be "Simple"
		}
	}
	
	Context "Check that master database is accessible" {
		$results = Get-DbaDatabase -SqlInstance localhost -Database master
		It "Should return true that master is accessible" {
			$results.IsAccessible | Should Be $true
		}
	}
}

Add test validate the IsAccessible property
Add test validate the IsAccessible property
