refactored the supporting file list that gets copied so it can be tested

This commit is contained in:
dfinke
2018-08-01 11:18:13 -04:00
parent a0719b22f0
commit 26bf4b9a64
4 changed files with 52 additions and 42 deletions

View File

@@ -27,3 +27,4 @@ intellisense
PivtoTableName
New-Excelchart
paypal
dll

View File

@@ -18,48 +18,7 @@ Begin {
Try {
Write-Verbose "$ModuleName module installation started"
$Files = @(
'*.dll',
'*.psd1',
'*.psm1',
'AddConditionalFormatting.ps1',
'Charting.ps1',
'ColorCompletion.ps1',
'Compare-Worksheet.ps1',
'ConvertFromExcelData.ps1',
'ConvertFromExcelToSQLInsert.ps1',
'ConvertExcelToImageFile.ps1',
'ConvertToExcelXlsx.ps1',
'Copy-ExcelWorkSheet.ps1',
'Export-Charts.ps1',
'Export-Excel.ps1',
'Export-ExcelSheet.ps1',
'Get-ExcelColumnName.ps1',
'Get-ExcelSheetInfo.ps1',
'Get-ExcelWorkbookInfo.ps1',
'Get-HtmlTable.ps1',
'Get-Range.ps1',
'Get-XYRange.ps1',
'Import-Html.ps1',
'InferData.ps1',
'Invoke-Sum.ps1',
'Join-Worksheet.ps1',
'Merge-Worksheet.ps1',
'New-ConditionalFormattingIconSet.ps1',
'New-ConditionalText.ps1',
'New-ExcelChart.ps1',
'New-PSItem.ps1',
'Open-ExcelPackage.ps1',
'Pivot.ps1',
'Plot.ps1',
'Send-SQLDataToExcel.ps1',
'Set-CellStyle.ps1',
'Set-Column.ps1',
'Set-Row.ps1',
'SetFormat.ps1',
'TrackingUtils.ps1',
'Update-FirstObjectProperties.ps1'
)
$Files = Get-Content $PSScriptRoot\filelist.txt
}
Catch {
throw "Failed installing the module '$ModuleName': $_"

View File

@@ -0,0 +1,10 @@
Describe "ImportExcel File List" {
It "All files should exist" {
$fileList = Get-Content "$PSScriptRoot\..\filelist.txt"
foreach ($file in $fileList) {
$targetFile = "$PSScriptRoot\..\$file"
Test-Path $targetFile | Should Be $true
}
}
}

40
filelist.txt Normal file
View File

@@ -0,0 +1,40 @@
*.dll
*.psd1
*.psm1
AddConditionalFormatting.ps1
Charting.ps1
ColorCompletion.ps1
Compare-Worksheet.ps1
ConvertFromExcelData.ps1
ConvertFromExcelToSQLInsert.ps1
ConvertExcelToImageFile.ps1
ConvertToExcelXlsx.ps1
Copy-ExcelWorkSheet.ps1
Export-Charts.ps1
Export-Excel.ps1
Export-ExcelSheet.ps1
Get-ExcelColumnName.ps1
Get-ExcelSheetInfo.ps1
Get-ExcelWorkbookInfo.ps1
Get-HtmlTable.ps1
Get-Range.ps1
Get-XYRange.ps1
Import-Html.ps1
InferData.ps1
Invoke-Sum.ps1
Join-Worksheet.ps1
Merge-Worksheet.ps1
New-ConditionalFormattingIconSet.ps1
New-ConditionalText.ps1
New-ExcelChart.ps1
New-PSItem.ps1
Open-ExcelPackage.ps1
Pivot.ps1
Plot.ps1
Send-SQLDataToExcel.ps1
Set-CellStyle.ps1
Set-Column.ps1
Set-Row.ps1
SetFormat.ps1
TrackingUtils.ps1
Update-FirstObjectProperties.ps1