Skip to content

Commit

Permalink
Change misleading variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Jan 13, 2025
1 parent 2edd9ba commit 228ad0f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/FwLite/MiniLcm.Tests/UpdateEntryTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ public async Task UpdateEntry_CanReorderSenses(string before, string after, stri
// arrange
var entryId = Guid.NewGuid();
var senseIds = before.Split(',').Concat(after.Split(',')).Distinct()
.ToDictionary(i => i, _ => Guid.NewGuid());
var beforeSenses = before.Split(',').Select(i => new Sense() { Id = senseIds[i], EntryId = entryId, Gloss = { { "en", i } } }).ToList();
var afterSenses = after.Split(',').Select(i => new Sense() { Id = senseIds[i], EntryId = entryId, Gloss = { { "en", i } } }).ToList();
.ToDictionary(@char => @char, _ => Guid.NewGuid());
var beforeSenses = before.Split(',').Select(@char => new Sense() { Id = senseIds[@char], EntryId = entryId, Gloss = { { "en", @char } } }).ToList();
var afterSenses = after.Split(',').Select(@char => new Sense() { Id = senseIds[@char], EntryId = entryId, Gloss = { { "en", @char } } }).ToList();

var beforeEntry = await Api.CreateEntry(new()
{
Expand Down Expand Up @@ -174,9 +174,9 @@ public async Task UpdateEntry_CanReorderExampleSentence(string before, string af
var entryId = Guid.NewGuid();
var senseId = Guid.NewGuid();
var exampleIds = before.Split(',').Concat(after.Split(',')).Distinct()
.ToDictionary(i => i, _ => Guid.NewGuid());
var beforeExamples = before.Split(',').Select(i => new ExampleSentence() { Id = exampleIds[i], SenseId = senseId, Sentence = { { "en", i } } }).ToList();
var afterExamples = after.Split(',').Select(i => new ExampleSentence() { Id = exampleIds[i], SenseId = senseId, Sentence = { { "en", i } } }).ToList();
.ToDictionary(@char => @char, _ => Guid.NewGuid());
var beforeExamples = before.Split(',').Select(@char => new ExampleSentence() { Id = exampleIds[@char], SenseId = senseId, Sentence = { { "en", @char } } }).ToList();
var afterExamples = after.Split(',').Select(@char => new ExampleSentence() { Id = exampleIds[@char], SenseId = senseId, Sentence = { { "en", @char } } }).ToList();

var beforeEntry = await Api.CreateEntry(new()
{
Expand Down

0 comments on commit 228ad0f

Please sign in to comment.