Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
Auto stash before merge of "dev" and "origin/dev"
Browse files Browse the repository at this point in the history
  • Loading branch information
lsobtafo committed Feb 28, 2024
2 parents 56ec835 + 734ea5f commit 9a067dc
Show file tree
Hide file tree
Showing 40 changed files with 1,284 additions and 1,343 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Frontend Requirement Specification
about: For specifying the frontend requirements of the project.
title: Frontend – [Requirement Description]
title: Frontend – [Requirement Description] – [Gui Element]
labels: requirement
assignees: ''

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ jobs:
strategy:
matrix:
targetplatform: [x64]
#targetplatform: [x86, x64]

runs-on: windows-latest

env:
Project_File: FAFB-PowerShell-Tool\FAFB-PowerShell-Tool.csproj
Project_File: ActiveDirectoryQuerier\ActiveDirectoryQuerier.csproj

steps:
- name: Checkout
Expand All @@ -31,7 +30,8 @@ jobs:
Import-Module ActiveDirectory
- name: Dotnet Restore & Build
run: dotnet build $env:Project_File -c Debug -f net6.0-windows -r win-${{ matrix.targetplatform }}
run: dotnet build $env:Project_File -c Debug -f net8.0-windows -r win-${{ matrix.targetplatform }}

- name: Dotnet Test
run: dotnet test
- name: Dotnet Test with Coverage
run: |
dotnet test $env:Project_File --no-build
8 changes: 4 additions & 4 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: windows-latest

env:
Project_File: FAFB-PowerShell-Tool\FAFB-PowerShell-Tool.csproj
Project_File: ActiveDirectoryQuerier\ActiveDirectoryQuerier.csproj

steps:
- name: Checkout
Expand All @@ -30,15 +30,15 @@ jobs:
- name: Dotnet Build & Publish
run: |
dotnet build $env:Project_File -c Release -f net6.0-windows -r win-${{ matrix.targetplatform }}
dotnet publish $env:Project_File -c Release -f net6.0-windows -r win-${{ matrix.targetplatform }} -o ./publish/FAFB_PowerShell_Tool_${{ matrix.targetplatform }}
dotnet publish $env:Project_File -c Release -f net6.0-windows -r win-${{ matrix.targetplatform }} -o ./publish/ActiveDirectoryQuerier_${{ matrix.targetplatform }}
- name: Zip Release Files
run: Compress-Archive -Path .\publish\FAFB_PowerShell_Tool_${{ matrix.targetplatform }} -DestinationPath .\FAFB_PowerShell_Tool_${{ matrix.targetplatform }}.zip
run: Compress-Archive -Path .\publish\ActiveDirectoryQuerier_${{ matrix.targetplatform }} -DestinationPath .\ActiveDirectoryQuerier_${{ matrix.targetplatform }}.zip

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: FAFB_PowerShell_Tool_${{ matrix.targetplatform }}.zip
files: ActiveDirectoryQuerier_${{ matrix.targetplatform }}.zip
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -476,14 +476,14 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

.vscode/launch.json

.vscode/tasks.json
# Rider files
.idea

.idea/.idea.FAFB-PowerShell-Tool/.idea/indexLayout.xml

.idea/.idea.FAFB-PowerShell-Tool/.idea/workspace.xml

FAFB-PowerShell-Tool/FAFB-PowerShell-Tool-Output.txt
# VSCode files
.vscode/launch.json
.vscode/tasks.json

.idea/.idea.FAFB-PowerShell-Tool/.idea/
# Text and CSV files
*.txt
*.csv
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using FAFB_PowerShell_Tool.PowerShell;
using ActiveDirectoryQuerier.PowerShell;

namespace FAFB_PowerShell_Tool.Tests;
namespace ActiveDirectoryQuerier.Tests;

public class ActiveDirectoryCommandsTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<RootNamespace>FAFB_PowerShell_Tool.Tests</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnableNETAnalyzers>true</EnableNETAnalyzers>

<IsPackable>false</IsPackable>
<AssemblyName>ActiveDirectoryQuerier.Tests</AssemblyName>
<RootNamespace>ActiveDirectoryQuerier.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FAFB-PowerShell-Tool\FAFB-PowerShell-Tool.csproj" />
<ProjectReference Include="..\ActiveDirectoryQuerier\ActiveDirectoryQuerier.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Management.Automation.Runspaces;
using FAFB_PowerShell_Tool.PowerShell;
using ActiveDirectoryQuerier.PowerShell;

namespace FAFB_PowerShell_Tool.Tests;
namespace ActiveDirectoryQuerier.Tests;

public class CommandParametersTests
{
Expand All @@ -28,7 +28,7 @@ public async Task LoadCommandParametersAsync_PopulatesPossibleParameters_IsNotEm
// Assert
Assert.NotEmpty(commandParameters.PossibleParameters);
}

[Fact]
public async Task LoadCommandParametersAsync_CheckPossibleParameter_ContentIsCorrect()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Management.Automation.Runspaces;
using FAFB_PowerShell_Tool.PowerShell;
using ActiveDirectoryQuerier.PowerShell;

namespace FAFB_PowerShell_Tool.Tests;
namespace ActiveDirectoryQuerier.Tests;

public class PowerShellExecutorTests
{
Expand All @@ -23,7 +23,7 @@ public void Execute_WhenGivenValidCommand_ReturnsExpectedOutput(string cmd, stri
Assert.Empty(result.StdErr);
Assert.NotEmpty(result.StdOut);
}

[Fact]
public void Execute_CheckIfOutputChanged_ReturnsDifferentOutput()
{
Expand All @@ -45,7 +45,7 @@ public void Execute_CheckIfOutputChanged_ReturnsDifferentOutput()
[Theory]
[InlineData("Get-Command", "Module", "ActiveDirectory")]
[InlineData("Get-Process", "Name", "explorer")]
public async void ExecuteAsync_WhenGivenValidCommand_ReturnsExpectedOutput(string cmd,
public async Task ExecuteAsync_WhenGivenValidCommand_ReturnsExpectedOutput(string cmd,
string paramName,
string paramValue)
{
Expand Down Expand Up @@ -85,7 +85,7 @@ public void Execute_WhenGivenInvalidCommand_ReturnsExpectedOutput(string cmd, st
[Theory]
[InlineData("Get-ADUser", "InvalidParameter", "*")]
[InlineData("InvalidCommand", "Filter", "*")]
public async void ExecuteAsync_WhenGivenInvalidCommand_ReturnsExpectedOutput(string cmd,
public async Task ExecuteAsync_WhenGivenInvalidCommand_ReturnsExpectedOutput(string cmd,
string paramName,
string paramValue)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace FAFB_PowerShell_Tool.Tests;
namespace ActiveDirectoryQuerier.Tests;

public class RelayCommandTests
{
Expand Down Expand Up @@ -76,6 +76,7 @@ public void CanExecuteChanged_WithNullParameter_DoesNotThrow2()
RelayCommand command = new(
_ =>
{});
// ReSharper disable once EventUnsubscriptionViaAnonymousDelegate
command.CanExecuteChanged -= (_, _) =>
{};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using FAFB_PowerShell_Tool.PowerShell;
using ActiveDirectoryQuerier.PowerShell;

namespace FAFB_PowerShell_Tool.Tests;
namespace ActiveDirectoryQuerier.Tests;

public class ReturnValuesTest
{
Expand Down
4 changes: 2 additions & 2 deletions FAFB-PowerShell-Tool.sln → ActiveDirectoryQuerier.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34309.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FAFB-PowerShell-Tool", "FAFB-PowerShell-Tool\FAFB-PowerShell-Tool.csproj", "{C6E51308-E9E0-4738-9D5A-49841912633B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ActiveDirectoryQuerier", "ActiveDirectoryQuerier\ActiveDirectoryQuerier.csproj", "{C6E51308-E9E0-4738-9D5A-49841912633B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FAFB-PowerShell-Tool.Tests", "FAFB-PowerShell-Tool.Tests\FAFB-PowerShell-Tool.Tests.csproj", "{C1FD9137-6780-44AE-9920-A566FC555F68}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ActiveDirectoryQuerier.Tests", "ActiveDirectoryQuerier.Tests\ActiveDirectoryQuerier.Tests.csproj", "{C1FD9137-6780-44AE-9920-A566FC555F68}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
28 changes: 28 additions & 0 deletions ActiveDirectoryQuerier/ActiveDirectoryQuerier.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<PlatformTarget>x64</PlatformTarget>
<UseWPF>true</UseWPF>
<AssemblyName>ActiveDirectoryQuerier</AssemblyName>
<RootNamespace>ActiveDirectoryQuerier</RootNamespace>

<!-- Project Info. -->
<Title>Active Directory Querier</Title>
<Version>0.4.1</Version>
<Authors>Hunter T., Pieter Landry Sobtafo, Joseph</Authors>
<RepositoryUrl>https://github.com/StrangeRanger/FAFB-PowerShell-Tool</RepositoryUrl>

<!-- Project Compile Time Settings. -->
<PublishSingleFile>false</PublishSingleFile>
<SelfContained>true</SelfContained>
<DebugType>embedded</DebugType>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.18" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Application x:Class="FAFB_PowerShell_Tool.App"
<Application x:Class="ActiveDirectoryQuerier.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:FAFB_PowerShell_Tool"
StartupUri="MainWindow.xaml">
<Application.Resources>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Windows;

namespace FAFB_PowerShell_Tool;
namespace ActiveDirectoryQuerier;

/// <summary>
/// Interaction logic for App.xaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.ObjectModel;
using System.ComponentModel;

namespace FAFB_PowerShell_Tool;
namespace ActiveDirectoryQuerier;

/// <summary>
/// ViewModel for a ComboBox that displays possible parameters for a PowerShell command.
Expand All @@ -12,13 +12,6 @@ public sealed class ComboBoxParameterViewModel : INotifyPropertyChanged
public event PropertyChangedEventHandler? PropertyChanged;
private ObservableCollection<string> _possibleParameterList = new();
private string _selectedParameter = string.Empty;
private string _selectedParameterValue = string.Empty;

/// <summary>
/// Empty constructor to initialize a new ComboBoxParameterViewModel.
/// </summary>
public ComboBoxParameterViewModel()
{ }

/// <summary>
/// Initializes a new instance of the ComboBoxParameterViewModel class.
Expand All @@ -30,7 +23,7 @@ public ComboBoxParameterViewModel(ObservableCollection<string> possibleParameter
}

/// <summary>
/// Sets a unique selected value for each combo box
/// Sets a unique selected value for each combo box.
/// </summary>
public string SelectedParameter
{
Expand All @@ -44,21 +37,6 @@ public string SelectedParameter
}
}

/// <summary>
/// Gets or sets the selected parameter value for the unique ComboBox.
/// </summary>
public string SelectedParameterValue
{
get => _selectedParameterValue;
set {
if (_selectedParameterValue != value)
{
_selectedParameterValue = value;
OnPropertyChanged(nameof(SelectedParameterValue));
}
}
}

/// <summary>
/// Gets or sets the list of possible parameters that can be selected for a command.
/// </summary>
Expand Down
Loading

0 comments on commit 9a067dc

Please sign in to comment.