mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
Test frameworks consolidated (#12672)
This commit is contained in:
committed by
GitHub
parent
c3a51f9227
commit
e96c0da265
@@ -1,28 +1,27 @@
|
||||
// Copyright (c) Brice Lambson
|
||||
// Copyright (c) Brice Lambson
|
||||
// The Brice Lambson licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information. Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using ImageResizer.Properties;
|
||||
using Xunit;
|
||||
using Xunit.Extensions;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace ImageResizer.Views
|
||||
{
|
||||
public class TimeRemainingConverterTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("HourMinute", 1, 1, 0)]
|
||||
[InlineData("HourMinutes", 1, 2, 0)]
|
||||
[InlineData("HoursMinute", 2, 1, 0)]
|
||||
[InlineData("HoursMinutes", 2, 2, 0)]
|
||||
[InlineData("MinuteSecond", 0, 1, 1)]
|
||||
[InlineData("MinuteSeconds", 0, 1, 2)]
|
||||
[InlineData("MinutesSecond", 0, 2, 1)]
|
||||
[InlineData("MinutesSeconds", 0, 2, 2)]
|
||||
[InlineData("Second", 0, 0, 1)]
|
||||
[InlineData("Seconds", 0, 0, 2)]
|
||||
[DataTestMethod]
|
||||
[DataRow("HourMinute", 1, 1, 0)]
|
||||
[DataRow("HourMinutes", 1, 2, 0)]
|
||||
[DataRow("HoursMinute", 2, 1, 0)]
|
||||
[DataRow("HoursMinutes", 2, 2, 0)]
|
||||
[DataRow("MinuteSecond", 0, 1, 1)]
|
||||
[DataRow("MinuteSeconds", 0, 1, 2)]
|
||||
[DataRow("MinutesSecond", 0, 2, 1)]
|
||||
[DataRow("MinutesSeconds", 0, 2, 2)]
|
||||
[DataRow("Second", 0, 0, 1)]
|
||||
[DataRow("Seconds", 0, 0, 2)]
|
||||
public void ConvertWorks(string resource, int hours, int minutes, int seconds)
|
||||
{
|
||||
var timeRemaining = new TimeSpan(hours, minutes, seconds);
|
||||
@@ -35,7 +34,7 @@ namespace ImageResizer.Views
|
||||
parameter: null,
|
||||
CultureInfo.InvariantCulture);
|
||||
|
||||
Assert.Equal(
|
||||
Assert.AreEqual(
|
||||
string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
Resources.ResourceManager.GetString("Progress_TimeRemaining_" + resource, CultureInfo.InvariantCulture),
|
||||
|
||||
Reference in New Issue
Block a user