Dev/crutkas/fixing warnings (#5161)

* new lines & braces

* Tabs /space auto fix

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
This commit is contained in:
Clint Rutkas
2020-07-22 13:27:17 -07:00
committed by GitHub
parent 6efec9d280
commit 14247fa75a
114 changed files with 694 additions and 681 deletions

View File

@@ -21,7 +21,7 @@ namespace UnitTests_PreviewHandlerCommon
public void FormHandlerControl_ShouldCreateHandle_OnInitialization()
{
// Arrange and act
using (var testFormHandlerControl = new TestFormControl())
using (var testFormHandlerControl = new TestFormControl())
{
// Assert
Assert.IsTrue(testFormHandlerControl.IsHandleCreated);
@@ -111,7 +111,7 @@ namespace UnitTests_PreviewHandlerCommon
Assert.AreEqual(bounds, testFormHandlerControl.Bounds);
}
}
[TestMethod]
public void FormHandlerControl_ShouldSetTextColor_WhenSetTextColorCalled()
{

View File

@@ -19,7 +19,7 @@ namespace UnitTests_PreviewHandlerCommon
public class StreamWrapperTests
{
[TestMethod]
public void StreamWrapper_ShouldThrow_IfInitializeWithNullStream()
public void StreamWrapper_ShouldThrow_IfInitializeWithNullStream()
{
// Arrange
IStream stream = null;
@@ -30,7 +30,7 @@ namespace UnitTests_PreviewHandlerCommon
{
var streamWrapper = new StreamWrapper(stream);
}
catch (ArgumentNullException ex)
catch (ArgumentNullException ex)
{
exception = ex;
}
@@ -151,7 +151,7 @@ namespace UnitTests_PreviewHandlerCommon
{
// Arrange
int expectedDwOrigin = 0;
switch (origin)
switch (origin)
{
case SeekOrigin.Begin:
expectedDwOrigin = 0;
@@ -218,7 +218,7 @@ namespace UnitTests_PreviewHandlerCommon
{
streamWrapper.Read(buffer, offSet, bytesToRead);
}
catch (ArgumentOutOfRangeException ex)
catch (ArgumentOutOfRangeException ex)
{
exception = ex;
}
@@ -236,7 +236,7 @@ namespace UnitTests_PreviewHandlerCommon
// Arrange
var inputBuffer = new byte[1024];
var streamBytes = new byte[count];
for (int i = 0; i < count; i++)
for (int i = 0; i < count; i++)
{
streamBytes[i] = (byte)i;
}
@@ -244,12 +244,12 @@ namespace UnitTests_PreviewHandlerCommon
var stremMock = new Mock<IStream>();
stremMock
.Setup(x => x.Read(It.IsAny<byte []>(), It.IsAny<int>(), It.IsAny<IntPtr>()))
.Callback<byte [], int, IntPtr>((buffer, countToRead , bytesReadPtr) =>
{
Array.Copy(streamBytes, 0, buffer, 0, streamBytes.Length);
Marshal.WriteInt32(bytesReadPtr, count);
});
.Setup(x => x.Read(It.IsAny<byte[]>(), It.IsAny<int>(), It.IsAny<IntPtr>()))
.Callback<byte[], int, IntPtr>((buffer, countToRead, bytesReadPtr) =>
{
Array.Copy(streamBytes, 0, buffer, 0, streamBytes.Length);
Marshal.WriteInt32(bytesReadPtr, count);
});
var streamWrapper = new StreamWrapper(stremMock.Object);
@@ -274,7 +274,7 @@ namespace UnitTests_PreviewHandlerCommon
{
streamWrapper.Flush();
}
catch (NotImplementedException ex)
catch (NotImplementedException ex)
{
exception = ex;
}