-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from SteveDunn/dev
Dev
- Loading branch information
Showing
230 changed files
with
6,250 additions
and
17,023 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using FluentAssertions; | ||
using Intellenum; | ||
|
||
namespace Scratch | ||
{ | ||
public class ImpliedFieldNameTests | ||
{ | ||
[Fact] | ||
public void General() | ||
{ | ||
ImpliedFieldName.Instance1.Value.Should().Be(1); | ||
ImpliedFieldName.Instance2.Value.Should().Be(2); | ||
ImpliedFieldName.Instance3.Value.Should().Be(3); | ||
|
||
ImpliedFieldName.IsDefined(1).Should().BeTrue(); | ||
ImpliedFieldName.IsDefined(2).Should().BeTrue(); | ||
ImpliedFieldName.IsDefined(3).Should().BeTrue(); | ||
|
||
ImpliedFieldName.TryFromName("Instance1", out var i1).Should().BeTrue(); | ||
i1.Value.Should().Be(1); | ||
|
||
ImpliedFieldName.TryFromName("INSTANCE 3!!", out var i3).Should().BeTrue(); | ||
i3.Value.Should().Be(3); | ||
|
||
ImpliedFieldName.IsDefined(3).Should().BeTrue(); | ||
ImpliedFieldName.IsNamedDefined("INSTANCE 3!!").Should().BeTrue(); | ||
} | ||
} | ||
|
||
[Intellenum] | ||
public partial class ImpliedFieldName | ||
{ | ||
public static readonly ImpliedFieldName Instance1 = new(1); | ||
public static readonly ImpliedFieldName Instance2 = new(2); | ||
public static readonly ImpliedFieldName Instance3 = new("INSTANCE 3!!", 3); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using FluentAssertions; | ||
using Xunit.Abstractions; | ||
|
||
namespace Scratch | ||
{ | ||
public class ListTests | ||
{ | ||
private readonly ITestOutputHelper _testOutputHelper; | ||
|
||
public ListTests(ITestOutputHelper testOutputHelper) => _testOutputHelper = testOutputHelper; | ||
|
||
[Fact] | ||
public void General() | ||
{ | ||
var l = CustomerType.List(); | ||
|
||
l.Count().Should().Be(2); | ||
|
||
foreach (var (name, value) in CustomerType.List()) | ||
{ | ||
_testOutputHelper.WriteLine($"{name} - {value}"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.