mirror of
https://github.com/farcasclaudiu/MartianRobots.git
synced 2026-06-28 21:01:08 +03:00
Add project files.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FluentAssertions" Version="6.7.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
|
||||
<PackageReference Include="xunit" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MartianRobotsSolver\MartianRobotsSolver.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="sample_scent_output.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="sample_scent_input.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="sample_input.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="sample_output.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
using FluentAssertions;
|
||||
|
||||
namespace MartianRobotsSolver.Tests
|
||||
{
|
||||
public class UnitTestMarsSolver
|
||||
{
|
||||
[Fact]
|
||||
public async Task Sample_Solver_Test()
|
||||
{
|
||||
var input = await File.ReadAllTextAsync("sample_input.txt");
|
||||
var result = new MarsSolver().Process(input);
|
||||
var expectedOutput = await File.ReadAllTextAsync("sample_output.txt");
|
||||
result.Output.Should().Be(expectedOutput);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Second_Robot_Sense_The_Scent()
|
||||
{
|
||||
var input = await File.ReadAllTextAsync("sample_scent_input.txt");
|
||||
var result = new MarsSolver().Process(input);
|
||||
var expectedOutput = await File.ReadAllTextAsync("sample_scent_output.txt");
|
||||
result.Output.Should().Be(expectedOutput);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
global using Xunit;
|
||||
@@ -0,0 +1,7 @@
|
||||
5 3
|
||||
1 1 E
|
||||
RFRFRFRF
|
||||
3 2 N
|
||||
FRRFLLFFRRFLL
|
||||
0 3 W
|
||||
LLFFFRFLFL
|
||||
@@ -0,0 +1,3 @@
|
||||
1 1 E
|
||||
3 3 N LOST
|
||||
4 2 N
|
||||
@@ -0,0 +1,9 @@
|
||||
5 3
|
||||
1 1 E
|
||||
RFRFRFRF
|
||||
3 2 N
|
||||
FRRFLLFFRRFLL
|
||||
3 2 N
|
||||
FRRFLLFFRRFLL
|
||||
0 3 W
|
||||
LLFFFRFLFL
|
||||
@@ -0,0 +1,4 @@
|
||||
1 1 E
|
||||
3 3 N LOST
|
||||
3 2 N
|
||||
4 2 N
|
||||
Reference in New Issue
Block a user