Commit 56748e3
authored
Fix warnings (#3056)
I do not like warnings, because I treat them as potential errors. :) So
I fixed all warnings in the project, that could be fixed. Remaining
warnings during build are now only those regarding mixing old and new
.NET.
## Fixed warnings
- `CS0168` The variable 'ex' is declared but never used
- `MSTEST0001` Explicitly enable or disable tests parallelization
(https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0001)
- `MSTEST0017` Assertion arguments should be passed in the correct
order. 'actual' and 'expected'/'notExpected' arguments have been
swapped.
- `MSTEST0037` Use proper asertion methods:
- Use 'Assert.IsEmpty' instead of 'Assert.AreEqual'
- Use 'Assert.HasCount' instead of 'Assert.AreEqual'
- Use 'Assert.IsTrue' instead of 'Assert.AreEqual'
- Use 'Assert.AreEqual' instead of 'Assert.IsTrue'
- `MSTEST0044` 'DataTestMethod' is obsolete. Use 'TestMethod' instead.
- `MSTEST0056` Use the 'DisplayName' property instead of passing a
string argument to TestMethodAttribute
- `NU1504` Duplicate 'PackageReference' items found. Remove the
duplicate items or use the Update functionality to ensure a consistent
restore behavior. The duplicate 'PackageReference' items are:
Newtonsoft.Json , Newtonsoft.Json.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
* **Tests**
* Enabled parallel test execution at class level across test suites.
* Updated test assertions for consistency and standardisation.
* **Chores**
* Removed unused JSON serialisation package dependencies.
* Cleaned up imports and improved code formatting throughout tests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->File tree
15 files changed
+57
-62
lines changed- src
- MigrationTools.Clients.AzureDevops.Rest.Tests
- MigrationTools.Clients.FileSystem.Tests
- MigrationTools.Clients.TfsObjectModel.Tests
- Processors
- Tools
- MigrationTools.Clients.TfsObjectModel/Processors
- MigrationTools.ConsoleDataGenerator
- MigrationTools.Host.Tests
- MigrationTools.Tests
- Core/Clients
- Options
- ProcessorEnrichers
- Tools/FieldMaps
15 files changed
+57
-62
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 1 | + | |
7 | 2 | | |
8 | 3 | | |
9 | 4 | | |
10 | 5 | | |
11 | 6 | | |
12 | 7 | | |
13 | | - | |
| 8 | + | |
14 | 9 | | |
15 | 10 | | |
16 | 11 | | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
20 | | - | |
| 15 | + | |
21 | 16 | | |
22 | 17 | | |
23 | 18 | | |
| |||
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
36 | | - | |
| 31 | + | |
37 | 32 | | |
38 | 33 | | |
39 | 34 | | |
| |||
48 | 43 | | |
49 | 44 | | |
50 | 45 | | |
51 | | - | |
| 46 | + | |
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | | - | |
| 43 | + | |
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 1 | + | |
7 | 2 | | |
8 | 3 | | |
9 | 4 | | |
| |||
12 | 7 | | |
13 | 8 | | |
14 | 9 | | |
15 | | - | |
| 10 | + | |
16 | 11 | | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
20 | 15 | | |
21 | 16 | | |
22 | 17 | | |
23 | | - | |
| 18 | + | |
24 | 19 | | |
25 | 20 | | |
26 | 21 | | |
| |||
Lines changed: 9 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
42 | | - | |
| 40 | + | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
| |||
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
56 | | - | |
57 | | - | |
| 54 | + | |
58 | 55 | | |
59 | 56 | | |
60 | 57 | | |
| |||
68 | 65 | | |
69 | 66 | | |
70 | 67 | | |
71 | | - | |
| 68 | + | |
72 | 69 | | |
73 | 70 | | |
74 | 71 | | |
| |||
82 | 79 | | |
83 | 80 | | |
84 | 81 | | |
85 | | - | |
| 82 | + | |
86 | 83 | | |
87 | 84 | | |
88 | 85 | | |
| |||
101 | 98 | | |
102 | 99 | | |
103 | 100 | | |
104 | | - | |
| 101 | + | |
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
| |||
121 | 118 | | |
122 | 119 | | |
123 | 120 | | |
124 | | - | |
| 121 | + | |
125 | 122 | | |
126 | 123 | | |
127 | 124 | | |
| |||
140 | 137 | | |
141 | 138 | | |
142 | 139 | | |
143 | | - | |
| 140 | + | |
144 | 141 | | |
145 | 142 | | |
146 | 143 | | |
| |||
158 | 155 | | |
159 | 156 | | |
160 | 157 | | |
161 | | - | |
| 158 | + | |
162 | 159 | | |
163 | 160 | | |
164 | 161 | | |
| |||
170 | 167 | | |
171 | 168 | | |
172 | 169 | | |
173 | | - | |
| 170 | + | |
174 | 171 | | |
175 | 172 | | |
176 | 173 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
| 442 | + | |
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments