-
-
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.
fix: add SEs, SEGs and ELs to EntryLink (#77)
* fix: add SEs, SEGs and ELs to EntryLink This is done via changing inheritance: EntryLink now inherits SelectionEntryBase instead of EntryBase. closes #76 * docs: add changelog entry * fix: whitespace
- Loading branch information
Showing
7 changed files
with
65 additions
and
61 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
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
33 changes: 33 additions & 0 deletions
33
tests/WarHub.ArmouryModel.Source.Tests/DataFormat/XmlSchema2_01Tests.cs
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,33 @@ | ||
using System.Linq; | ||
using FluentAssertions; | ||
using Xunit; | ||
using static WarHub.ArmouryModel.Source.NodeFactory; | ||
|
||
namespace WarHub.ArmouryModel.Source.Tests.DataFormat | ||
{ | ||
public class XmlSchema2_01Tests | ||
{ | ||
[Fact] | ||
public void EntryLink_can_contain_entries() | ||
{ | ||
var link = EntryLink(SelectionEntry()); | ||
var result = link | ||
.AddSelectionEntries( | ||
SelectionEntry()) | ||
.AddSelectionEntryGroups( | ||
SelectionEntryGroup()) | ||
.AddEntryLinks( | ||
EntryLink( | ||
SelectionEntry())); | ||
new IListNode[] | ||
{ | ||
result.SelectionEntries, | ||
result.SelectionEntryGroups, | ||
result.EntryLinks | ||
} | ||
.Select(x => x.NodeList.Count) | ||
.Should() | ||
.AllBeEquivalentTo(1); | ||
} | ||
} | ||
} |
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