Skip to content

Commit

Permalink
test: Added integrations tests from WinUI for CalendarView and Calend…
Browse files Browse the repository at this point in the history
…arDatePicker
  • Loading branch information
carldebilly committed May 28, 2021
1 parent c8c26db commit 1011519
Show file tree
Hide file tree
Showing 25 changed files with 8,923 additions and 243 deletions.
12 changes: 12 additions & 0 deletions src/Uno.UI.RuntimeTests/Helpers/DateTimeOffsetExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;

namespace Uno.UI.RuntimeTests.Helpers
{
internal static class DateTimeOffsetExtensions
{
internal static long UniversalTime(this DateTimeOffset dto)
{
return dto.UtcTicks;
}
}
}
18 changes: 18 additions & 0 deletions src/Uno.UI.RuntimeTests/Helpers/ListExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Collections.Generic;

namespace Uno.UI.RuntimeTests.Helpers
{
internal static class ListExtensions
{
// Helpers for WinUI code compatibility
internal static T GetAt<T>(this List<T> list, int index) => list[index];

internal static T GetAt<T>(this IList<T> list, int index) => list[index];

internal static T GetAt<T>(this IReadOnlyList<T> list, int index) => list[index];

internal static void SetAt<T>(this IList<T> list, int index, T value) => list[index] = value;

internal static void Append<T>(this IList<T> list, T item) => list.Add(item);
}
}
Loading

0 comments on commit 1011519

Please sign in to comment.