Skip to content

Commit 931b8a3

Browse files
committed
Added ProfiencyLevel tests
1 parent 4d45261 commit 931b8a3

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System;
2+
using FluentAssertions;
3+
using LinkDotNet.Blog.Domain;
4+
using Xunit;
5+
6+
namespace LinkDotNet.Blog.UnitTests.Domain
7+
{
8+
public class ProficiencyLevelTests
9+
{
10+
[Theory]
11+
[InlineData("Familiar")]
12+
[InlineData("Proficient")]
13+
[InlineData("Expert")]
14+
public void ShouldCreateValidLevels(string key)
15+
{
16+
var level = ProficiencyLevel.Create(key);
17+
18+
level.Should().NotBeNull();
19+
}
20+
21+
[Theory]
22+
[InlineData("NotALevel")]
23+
[InlineData("")]
24+
[InlineData(null)]
25+
public void ShouldNotCreateInvalidLevels(string key)
26+
{
27+
Action act = () => ProficiencyLevel.Create(key);
28+
29+
act.Should().Throw<Exception>();
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)