Skip to content

Commit 37819c9

Browse files
authored
Update unit tests (#262)
***NO_CI***
1 parent 3b26484 commit 37819c9

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

Tests/UnitTestDebugLogging/EventIdTests.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ class EventIdTests
1515
public void TestEventIdBasic()
1616
{
1717
EventId eventId = 42;
18-
Assert.Equal(42, eventId.Id);
19-
Assert.Null(eventId.Name);
20-
Assert.Equal("42", eventId.ToString());
21-
Assert.Equal(42, eventId.GetHashCode());
18+
Assert.AreEqual(42, eventId.Id);
19+
Assert.IsNull(eventId.Name);
20+
Assert.AreEqual("42", eventId.ToString());
21+
Assert.AreEqual(42, eventId.GetHashCode());
2222
}
2323

2424
[TestMethod]
@@ -27,10 +27,10 @@ public void CompareEventId()
2727
EventId event1 = 1;
2828
EventId event1Bis = new EventId(1, "one");
2929
EventId event2 = 2;
30-
Assert.Equal(event1.Id, event1Bis.Id);
31-
Assert.True(event1.Equals(event1Bis));
32-
Assert.True(event1 == event1Bis);
33-
Assert.True(event1 != event2);
30+
Assert.AreEqual(event1.Id, event1Bis.Id);
31+
Assert.IsTrue(event1.Equals(event1Bis));
32+
Assert.IsTrue(event1 == event1Bis);
33+
Assert.IsTrue(event1 != event2);
3434
}
3535
}
3636
}

Tests/UnitTestDebugLogging/FormattingTest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
using nanoFramework.TestFramework;
1+
//
2+
// Copyright (c) .NET Foundation and Contributors
3+
// See LICENSE file in the project root for full license information.
4+
//
5+
6+
using nanoFramework.TestFramework;
27
using System;
38
using System.Diagnostics;
49
using nanoFramework.Logging;

Tests/UnitTestDebugLogging/LoggerExtensionsTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
//
55

66
using Microsoft.Extensions.Logging;
7-
using nanoFramework.Logging;
87
using nanoFramework.Logging.Debug;
98
using nanoFramework.TestFramework;
109
using System;
11-
using System.Diagnostics;
1210

1311
namespace UnitTestDebugLogging
1412
{

Tests/UnitTestDebugLogging/SerialTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using nanoFramework.Logging.Serial;
88
using nanoFramework.TestFramework;
99
using System;
10-
using System.IO.Ports;
1110
#if BUIID_FOR_ESP32
1211
using nanoFramework.Hardware.Esp32;
1312
#endif

0 commit comments

Comments
 (0)