Skip to content

Commit

Permalink
remove writing system creation from test code where redundant
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Dec 3, 2024
1 parent 6464001 commit 9192462
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 72 deletions.
24 changes: 1 addition & 23 deletions backend/FwLite/MiniLcm.Tests/BasicApiTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,6 @@ public abstract class BasicApiTestsBase : MiniLcmTestBase
public override async Task InitializeAsync()
{
await base.InitializeAsync();
await Api.CreateWritingSystem(WritingSystemType.Analysis,
new WritingSystem()
{
Id = Guid.NewGuid(),
Type = WritingSystemType.Analysis,
WsId = "en",
Name = "English",
Abbreviation = "En",
Font = "Arial",
Exemplars = []
});
await Api.CreateWritingSystem(WritingSystemType.Vernacular,
new WritingSystem()
{
Id = Guid.NewGuid(),
Type = WritingSystemType.Vernacular,
WsId = "en",
Name = "English",
Abbreviation = "En",
Font = "Arial",
Exemplars = []
});
await Api.CreateEntry(new Entry
{
Id = Entry1Id,
Expand Down Expand Up @@ -141,7 +119,7 @@ await Api.CreateWritingSystem(WritingSystemType.Vernacular,
{
Id = Guid.NewGuid(),
Type = WritingSystemType.Vernacular,
WsId = "en",
WsId = "es",
Name = "test",
Abbreviation = "test",
Font = "Arial",
Expand Down
27 changes: 0 additions & 27 deletions backend/FwLite/MiniLcm.Tests/SortingTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,6 @@

public abstract class SortingTestsBase : MiniLcmTestBase
{
public override async Task InitializeAsync()
{
await base.InitializeAsync();
await Api.CreateWritingSystem(WritingSystemType.Analysis,
new WritingSystem()
{
Id = Guid.NewGuid(),
Type = WritingSystemType.Analysis,
WsId = "en",
Name = "English",
Abbreviation = "En",
Font = "Arial",
Exemplars = []
});
await Api.CreateWritingSystem(WritingSystemType.Vernacular,
new WritingSystem()
{
Id = Guid.NewGuid(),
Type = WritingSystemType.Vernacular,
WsId = "en-US",
Name = "English",
Abbreviation = "En",
Font = "Arial",
Exemplars = []
});
}

private Task CreateEntry(string headword)
{
return Api.CreateEntry(new() { LexemeForm = { { "en", headword } }, });
Expand Down
22 changes: 0 additions & 22 deletions backend/FwLite/MiniLcm.Tests/UpdateEntryTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,6 @@ public abstract class UpdateEntryTestsBase : MiniLcmTestBase
public override async Task InitializeAsync()
{
await base.InitializeAsync();
await Api.CreateWritingSystem(WritingSystemType.Analysis,
new WritingSystem()
{
Id = Guid.NewGuid(),
Type = WritingSystemType.Analysis,
WsId = "en",
Name = "English",
Abbreviation = "En",
Font = "Arial",
Exemplars = []
});
await Api.CreateWritingSystem(WritingSystemType.Vernacular,
new WritingSystem()
{
Id = Guid.NewGuid(),
Type = WritingSystemType.Vernacular,
WsId = "en",
Name = "English",
Abbreviation = "En",
Font = "Arial",
Exemplars = []
});
await Api.CreateEntry(new Entry
{
Id = Entry1Id,
Expand Down

0 comments on commit 9192462

Please sign in to comment.