Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 0 additions & 6 deletions bin/add-practice-exercise.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ $project = "${exerciseDir}/${ExerciseName}.csproj"
& dotnet new xunit --force -lang "C#" --target-framework-override net9.0 -o $exerciseDir -n $ExerciseName
& dotnet sln exercises/Exercises.sln add $project

# Cleanup project file
[xml]$projectXml = Get-Content "${project}"
$projectXml.Project.RemoveChild($projectXml.Project.ItemGroup[1])
$projectXml.Project.PropertyGroup.RemoveChild($projectXml.Project.PropertyGroup.SelectSingleNode("ImplicitUsings"))
$projectXml.Save("${project}")

# Update project packages
& dotnet remove $project package coverlet.collector
& dotnet add $project package Exercism.Tests --version 0.1.0-beta1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

static class QuestLogic
{
public static bool CanFastAttack(bool knightIsAwake)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Xunit;
using Exercism.Tests;

public class AnnalynsInfiltrationTests
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/attack-of-the-trolls/.meta/Exemplar.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

enum AccountType
{
Guest,
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/attack-of-the-trolls/AttackOfTheTrolls.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

// TODO: define the 'AccountType' enum

// TODO: define the 'Permission' enum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Xunit;
using Exercism.Tests;

public class AttackOfTheTrollsTests
Expand Down
1 change: 0 additions & 1 deletion exercises/concept/authentication-system/.meta/Exemplar.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;

public class Authenticator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;

public class Authenticator
{
private class EyeColor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using Xunit;
using Exercism.Tests;

public class AuthenticationSystemTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Globalization;
using System.Runtime.InteropServices;

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


public enum Location
{
NewYork,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
using Xunit;

using Exercism.Tests;

public class BeautySalonGoesGlobalTests
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/bird-watcher/.meta/Exemplar.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

class BirdCount
{
private int[] birdsPerDay;
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/bird-watcher/BirdWatcher.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

class BirdCount
{
private int[] birdsPerDay;
Expand Down
5 changes: 5 additions & 0 deletions exercises/concept/bird-watcher/BirdWatcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
1 change: 0 additions & 1 deletion exercises/concept/bird-watcher/BirdWatcherTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Xunit;
using Exercism.Tests;

public class BirdWatcherTests
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/booking-up-for-beauty/.meta/Exemplar.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

static class Appointment
{
public static DateTime Schedule(string appointmentDateDescription)
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/booking-up-for-beauty/BookingUpForBeauty.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

static class Appointment
{
public static DateTime Schedule(string appointmentDateDescription)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Xunit;
using Exercism.Tests;
using System;

using System.Globalization;
using System.Threading;

public class BookingUpForBeautyTests
{
Expand Down
3 changes: 0 additions & 3 deletions exercises/concept/building-telemetry/.meta/Exemplar.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;


public class RemoteControlCar
{
private int batteryPercentage = 100;
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/building-telemetry/BuildingTelemetry.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

public class RemoteControlCar
{
private int batteryPercentage = 100;
Expand Down
5 changes: 5 additions & 0 deletions exercises/concept/building-telemetry/BuildingTelemetry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Xunit;
using Exercism.Tests;

public class BuildingTelemetryTests
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/calculator-conundrum/.meta/Exemplar.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

public static class SimpleCalculator
{
public static string Calculate(int operand1, int operand2, string? operation)
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/calculator-conundrum/CalculatorConundrum.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

public static class SimpleCalculator
{
public static string Calculate(int operand1, int operand2, string? operation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Xunit;
using Exercism.Tests;
using System;

public class CalculatorConundrumTests
{
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/cars-assemble/CarsAssemble.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

static class AssemblyLine
{
public static double SuccessRate(int speed)
Expand Down
5 changes: 5 additions & 0 deletions exercises/concept/cars-assemble/CarsAssemble.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
1 change: 0 additions & 1 deletion exercises/concept/cars-assemble/CarsAssembleTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Xunit;
using Exercism.Tests;

public class CarsAssembleTests
Expand Down
3 changes: 0 additions & 3 deletions exercises/concept/developer-privileges/.meta/Exemplar.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

public class Authenticator
{
public Identity Admin { get; } = new Identity
Expand Down
3 changes: 0 additions & 3 deletions exercises/concept/developer-privileges/DeveloperPrivileges.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

public class Authenticator
{
// TODO: Implement the Authenticator.Admin property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Xunit;
using Exercism.Tests;

public class DeveloperPrivilegesTests
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/elons-toys/ElonsToys.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

class RemoteControlCar
{
public static RemoteControlCar Buy()
Expand Down
5 changes: 5 additions & 0 deletions exercises/concept/elons-toys/ElonsToys.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
1 change: 0 additions & 1 deletion exercises/concept/elons-toys/ElonsToysTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Xunit;
using Exercism.Tests;

public class ElonsToysTests
Expand Down
3 changes: 0 additions & 3 deletions exercises/concept/faceid-2/.meta/Exemplar.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

public class FacialFeatures
{
public string EyeColor { get; }
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/faceid-2/Faceid2.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

public class FacialFeatures
{
public string EyeColor { get; }
Expand Down
5 changes: 5 additions & 0 deletions exercises/concept/faceid-2/Faceid2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
1 change: 0 additions & 1 deletion exercises/concept/faceid-2/Faceid2Tests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Xunit;
using Exercism.Tests;

public class Faceid2Tests
Expand Down
Loading