Skip to content

Commit f7eff21

Browse files
Merge pull request #402 from sourceallies/f-sharp
2 parents 1443301 + 19425a0 commit f7eff21

File tree

10 files changed

+125
-0
lines changed

10 files changed

+125
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "F-Sharp",
3+
"image": "mcr.microsoft.com/devcontainers/dotnet:9.0",
4+
"postCreateCommand": "make init",
5+
"workspaceFolder": "/workspaces/interviews/f-sharp",
6+
"customizations": {
7+
"vscode": {
8+
"settings": {
9+
"liveshare.allowGuestDebugControl": true,
10+
"liveshare.allowGuestTaskControl": true,
11+
"liveshare.languages.allowGuestCommandControl": true,
12+
"liveshare.publishWorkspaceInfo": true,
13+
"extensions.ignoreRecommendations": true,
14+
"workbench.startupEditor": "readme",
15+
"git.openRepositoryInParentFolders": "never",
16+
"git.autofetch": true,
17+
"chat.disableAIFeatures": true
18+
},
19+
"extensions": [
20+
"ms-vsliveshare.vsliveshare",
21+
"ms-dotnettools.csharp",
22+
"ms-dotnettools.csdevkit",
23+
"ionide.ionide-fsharp",
24+
"-github.copilot-chat"
25+
]
26+
}
27+
}
28+
}

f-sharp/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bin
2+
obj
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net9.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<Compile Include="Greeting.fs" />
10+
<Compile Include="Program.fs" />
11+
</ItemGroup>
12+
13+
</Project>

f-sharp/Application/Greeting.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Greeter
2+
3+
let greet name =
4+
sprintf "Hello, %s!" name

f-sharp/Application/Program.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
open System
2+
3+
Greeter.greet "World" |> Console.WriteLine

f-sharp/FSharp.slnx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<Solution>
2+
<Project Path="Application/Application.fsproj" />
3+
<Project Path="UnitTests/UnitTests.fsproj" />
4+
</Solution>

f-sharp/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
init:
2+
dotnet build
3+
4+
verify:
5+
dotnet test
6+
7+
run:
8+
dotnet run --project Application
9+
10+
.PHONY: init verify run

f-sharp/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# F# Technical Interview
2+
3+
We're excited to pair with you on a coding kata!
4+
5+
You will use this solution to write your code and tests to solve the problem of the kata below. We will gradually add requirements as we move through the problem and get a feel of what it's like to work with you in a real-world situation. Take your time, explain your thinking, and have fun with us! Show off your skills and ask any questions you have and we'll do the same.
6+
7+
## Tech Stack
8+
- .NET with F#
9+
- xUnit
10+
11+
## Common Commands
12+
- `make init`
13+
- build the project
14+
- `make verify`
15+
- run tests
16+
- `make run`
17+
- run the application
18+
19+
## Kata
20+
21+
This section of the README is used to describe the kata and outline the requirements. We'll leave it blank in the public repository to keep the mystery alive, but just know that the kata we have planned is really fun!
22+
23+
### Introduction
24+
25+
### Requirements
26+
27+
1. Requirement 1
28+
2. Requirement 2
29+
3. Requirement 3

f-sharp/UnitTests/Tests.fs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module Tests
2+
3+
open Xunit
4+
5+
[<Fact>]
6+
let ``Greet returns formatted message`` () =
7+
let result = Greeter.greet "World"
8+
9+
Assert.Equal("Hello, World!", result)

f-sharp/UnitTests/UnitTests.fsproj

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net9.0</TargetFramework>
5+
<IsPackable>false</IsPackable>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<Compile Include="Tests.fs" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="coverlet.collector" Version="6.0.4" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
15+
<PackageReference Include="xunit" Version="2.9.3" />
16+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />
17+
</ItemGroup>
18+
19+
<ItemGroup>
20+
<ProjectReference Include="..\Application\Application.fsproj" />
21+
</ItemGroup>
22+
23+
</Project>

0 commit comments

Comments
 (0)