mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
Test frameworks consolidated (#12672)
This commit is contained in:
committed by
GitHub
parent
c3a51f9227
commit
e96c0da265
@@ -1,4 +1,4 @@
|
||||
// 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/
|
||||
|
||||
@@ -8,7 +8,9 @@ using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.IO.Abstractions;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Xunit;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1636:FileHeaderCopyrightTextMustMatch", Justification = "File created under PowerToys.")]
|
||||
|
||||
namespace ImageResizer.Test
|
||||
{
|
||||
@@ -50,7 +52,7 @@ namespace ImageResizer.Test
|
||||
testCode();
|
||||
detach(handler);
|
||||
|
||||
Assert.NotNull(raisedEvent);
|
||||
Assert.IsNotNull(raisedEvent);
|
||||
|
||||
return raisedEvent;
|
||||
}
|
||||
@@ -68,7 +70,7 @@ namespace ImageResizer.Test
|
||||
testCode();
|
||||
detach(handler);
|
||||
|
||||
Assert.NotNull(raisedEvent);
|
||||
Assert.IsNotNull(raisedEvent);
|
||||
|
||||
return raisedEvent;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// 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/
|
||||
|
||||
@@ -8,7 +8,6 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Xunit;
|
||||
using IOPath = System.IO.Path;
|
||||
|
||||
namespace ImageResizer
|
||||
@@ -32,8 +31,7 @@ namespace ImageResizer
|
||||
public IEnumerable<string> FileNames
|
||||
=> Files.Select(IOPath.GetFileName);
|
||||
|
||||
public string File()
|
||||
=> Assert.Single(Files);
|
||||
public string File() => Files.Single();
|
||||
|
||||
public static implicit operator string(TestDirectory directory)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user