Skip to content

Commit a760e97

Browse files
committed
Make suppoting fn private and move them to bottom of file
1 parent f0a3950 commit a760e97

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

UnitTests/UnitTests.UWP/UI/Controls/Test_RangeSelector.cs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -181,23 +181,6 @@ public Task Initialize_MinEqMax(double rangeStart, double rangeEnd, double expec
181181
public Task Initialize_MinGtMax(double rangeStart, double rangeEnd, double expectedMinimum, double expectedRangeStart, double expectedRangeEnd, double expectedMaximum)
182182
=> Initialize(1, 100, rangeStart, rangeEnd, 0, 1, expectedMinimum, expectedRangeStart, expectedRangeEnd, expectedMaximum);
183183

184-
public async Task Initialize(double stepFrequency, double minimum, double rangeStart, double rangeEnd, double maximum, double expectedStepFrequency, double expectedMinimum, double expectedRangeStart, double expectedRangeEnd, double expectedMaximum)
185-
{
186-
var input = new TestRecord(stepFrequency, minimum, rangeStart, rangeEnd, maximum);
187-
var expected = new TestRecord(expectedStepFrequency, expectedMinimum, expectedRangeStart, expectedRangeEnd, expectedMaximum);
188-
189-
await App.DispatcherQueue.EnqueueAsync(async () =>
190-
{
191-
var r = BuildRangeSelecor(input);
192-
193-
await SetTestContentAsync(r);
194-
195-
var actual = BuildTestRecord(r);
196-
197-
Assert.AreEqual(expected, actual);
198-
});
199-
}
200-
201184
[TestMethod]
202185
[TestCategory("Set Prop")]
203186

@@ -299,7 +282,24 @@ public Task SetRangeEnd_StepTest(double stepFrequency, double rangeStart, double
299282

300283
#pragma warning restore SA1025, SA1008, SA1021
301284

302-
public async Task SetProp(double stepFrequency, double minimum, double rangeStart, double rangeEnd, double maximum, Property targetProp, double propInput, double expectedStepFrequency, double expectedMinimum, double expectedRangeStart, double expectedRangeEnd, double expectedMaximum)
285+
private async Task Initialize(double stepFrequency, double minimum, double rangeStart, double rangeEnd, double maximum, double expectedStepFrequency, double expectedMinimum, double expectedRangeStart, double expectedRangeEnd, double expectedMaximum)
286+
{
287+
var input = new TestRecord(stepFrequency, minimum, rangeStart, rangeEnd, maximum);
288+
var expected = new TestRecord(expectedStepFrequency, expectedMinimum, expectedRangeStart, expectedRangeEnd, expectedMaximum);
289+
290+
await App.DispatcherQueue.EnqueueAsync(async () =>
291+
{
292+
var r = BuildRangeSelecor(input);
293+
294+
await SetTestContentAsync(r);
295+
296+
var actual = BuildTestRecord(r);
297+
298+
Assert.AreEqual(expected, actual);
299+
});
300+
}
301+
302+
private async Task SetProp(double stepFrequency, double minimum, double rangeStart, double rangeEnd, double maximum, Property targetProp, double propInput, double expectedStepFrequency, double expectedMinimum, double expectedRangeStart, double expectedRangeEnd, double expectedMaximum)
303303
{
304304
await App.DispatcherQueue.EnqueueAsync(async () =>
305305
{
@@ -338,7 +338,7 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
338338
});
339339
}
340340

341-
public enum Property
341+
private enum Property
342342
{
343343
StepFrequency,
344344
Minimum,
@@ -347,9 +347,9 @@ public enum Property
347347
RangeEnd
348348
}
349349

350-
public record TestRecord(double StepFrequency, double Minimum, double RangeStart, double RangeEnd, double Maximum);
350+
private record TestRecord(double StepFrequency, double Minimum, double RangeStart, double RangeEnd, double Maximum);
351351

352-
public static RangeSelector BuildRangeSelecor(TestRecord input)
352+
private static RangeSelector BuildRangeSelecor(TestRecord input)
353353
=> new()
354354
{
355355
StepFrequency = input.StepFrequency,
@@ -359,7 +359,7 @@ public static RangeSelector BuildRangeSelecor(TestRecord input)
359359
RangeEnd = input.RangeEnd,
360360
};
361361

362-
public static TestRecord BuildTestRecord(RangeSelector r)
362+
private static TestRecord BuildTestRecord(RangeSelector r)
363363
=> new(r.StepFrequency, r.Minimum, r.RangeStart, r.RangeEnd, r.Maximum);
364364
}
365365
}

0 commit comments

Comments
 (0)