This repository has been archived by the owner on Dec 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from StrangeRanger/MVVM-Pattern
MVVM Pattern
- Loading branch information
Showing
17 changed files
with
386 additions
and
435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
namespace FAFB_PowerShell_Tool.Tests; | ||
|
||
public class CustomQueriesTest | ||
{ | ||
|
||
} | ||
{ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
global using Xunit; | ||
global using Xunit; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
using FAFB_PowerShell_Tool.PowerShell.Commands; | ||
using System.Management.Automation.Internal; | ||
using System.Management.Automation.Runspaces; | ||
using FAFB_PowerShell_Tool; | ||
using FAFB_PowerShell_Tool.PowerShell; | ||
|
||
namespace FAFB_PowerShell_Tool.Tests; | ||
|
||
public class SaveOptionsTest | ||
{ | ||
[Fact] | ||
/*[Fact] | ||
public void SaveToCSVAppendsParameter() | ||
{ | ||
var saveOptions = new PSSaveOptions(); | ||
InternalCommand command = new("Get-ADUser", new[] { "-Identity", "Test" }); | ||
Command commandString = new("Get-ADUser"); | ||
commandString.Parameters.Add("Identity", "Test"); | ||
InternalCommand returnedCommand = saveOptions.OutputToCSV(command); | ||
InternalCommand returnedCommand = saveOptions.OutputToCSV(commandString); | ||
Assert.Equal("Get-ADUser -Identity Test | Export-CSV ..\\..\\..\\SavedOutput\\output.csv", returnedCommand.CommandString); | ||
} | ||
[Fact] | ||
Assert.Equal("Get-ADUser -Identity Test | Export-CSV ..\\..\\..\\SavedOutput\\output.csv", | ||
returnedCommand.CommandString); | ||
}*/ | ||
|
||
/*[Fact] | ||
public void ExecuteOutputToCSV() | ||
{ | ||
PSSaveOptions pssave = new PSSaveOptions(); | ||
PowerShellExecutor executor = new PowerShellExecutor(); | ||
InternalCommand test_command = new("get-process"); | ||
ReturnValues temprv = executor.Execute(pssave.OutputToCSV(test_command)); | ||
//Check if a csv was made | ||
//Check if a csv was made | ||
Assert.True(File.Exists("..\\..\\..\\SavedOutput\\output.csv")); | ||
//File.Delete("..\\..\\..\\FAFB-PowerShell-Tool\\SavedOutput\\output.csv"); | ||
} | ||
|
||
|
||
|
||
|
||
} | ||
}*/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.