Adding all tracks, I guess
This commit is contained in:
15
csharp/reverse-string/README.md
Normal file
15
csharp/reverse-string/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Reverse String
|
||||
|
||||
Reverse a string
|
||||
|
||||
For example:
|
||||
input: "cool"
|
||||
output: "looc"
|
||||
|
||||
|
||||
## Source
|
||||
|
||||
Introductory challenge to reverse an input string [https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb](https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb)
|
||||
|
||||
## Submitting Incomplete Solutions
|
||||
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
9
csharp/reverse-string/ReverseString.cs
Normal file
9
csharp/reverse-string/ReverseString.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
public static class ReverseString
|
||||
{
|
||||
public static string Reverse(string input)
|
||||
{
|
||||
throw new NotImplementedException("You need to implement this function.");
|
||||
}
|
||||
}
|
17
csharp/reverse-string/ReverseString.csproj
Normal file
17
csharp/reverse-string/ReverseString.csproj
Normal file
@@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Example.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
|
||||
<PackageReference Include="xunit" Version="2.3.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
36
csharp/reverse-string/ReverseStringTest.cs
Normal file
36
csharp/reverse-string/ReverseStringTest.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
// This file was auto-generated based on version 1.1.0 of the canonical data.
|
||||
|
||||
using Xunit;
|
||||
|
||||
public class ReverseStringTest
|
||||
{
|
||||
[Fact]
|
||||
public void An_empty_string()
|
||||
{
|
||||
Assert.Equal("", ReverseString.Reverse(""));
|
||||
}
|
||||
|
||||
[Fact(Skip = "Remove to run test")]
|
||||
public void A_word()
|
||||
{
|
||||
Assert.Equal("tobor", ReverseString.Reverse("robot"));
|
||||
}
|
||||
|
||||
[Fact(Skip = "Remove to run test")]
|
||||
public void A_capitalized_word()
|
||||
{
|
||||
Assert.Equal("nemaR", ReverseString.Reverse("Ramen"));
|
||||
}
|
||||
|
||||
[Fact(Skip = "Remove to run test")]
|
||||
public void A_sentence_with_punctuation()
|
||||
{
|
||||
Assert.Equal("!yrgnuh m'I", ReverseString.Reverse("I'm hungry!"));
|
||||
}
|
||||
|
||||
[Fact(Skip = "Remove to run test")]
|
||||
public void A_palindrome()
|
||||
{
|
||||
Assert.Equal("racecar", ReverseString.Reverse("racecar"));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user