Skip to content

Commit 13aa185

Browse files
committed
refactor(MetadataFile): moving files around
1 parent 79a7c46 commit 13aa185

File tree

2 files changed

+23
-35
lines changed

2 files changed

+23
-35
lines changed

PCL2.Neo.Tests/Minecraft/Models/MetadataFileTest.cs renamed to PCL2.Neo.Tests/Models/Minecraft/MetadataFileTest.cs

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using PCL2.Neo.Minecraft.Models;
1+
using PCL2.Neo.Models.Minecraft;
22
using System.Text.Json.Nodes;
33

4-
namespace PCL2.Neo.Tests.Minecraft.Models;
4+
namespace PCL2.Neo.Tests.Models.Minecraft;
55

66
public class MetadataFileTest
77
{
@@ -18,6 +18,7 @@ public void MainParsingTest()
1818
{
1919
Assert.That(meta.Arguments.Game.Count, Is.EqualTo(jsonObj["arguments"]!["game"]!.AsArray().Count));
2020
}
21+
2122
Assert.Multiple(() =>
2223
{
2324
Assert.That(meta.Assets, Is.Not.Empty);
@@ -39,6 +40,7 @@ public void MainParsingTest()
3940
Assert.That(file.Url, Is.Not.Empty);
4041
});
4142
}
43+
4244
Assert.That(meta.Id, Is.Not.Empty);
4345
Assert.Multiple(() =>
4446
{
@@ -106,28 +108,24 @@ public void ArgumentsParsingTest()
106108
"${version_type}",
107109
new MetadataFile.ConditionalArg
108110
{
109-
Rules = [
111+
Rules =
112+
[
110113
new MetadataFile.Rule
111114
{
112115
Action = MetadataFile.Rule.ActionEnum.Allow,
113-
Features = new Dictionary<string, bool>
114-
{
115-
["is_demo_user"] = true
116-
}
116+
Features = new Dictionary<string, bool> { ["is_demo_user"] = true }
117117
}
118118
],
119119
Value = ["--demo"]
120120
},
121121
new MetadataFile.ConditionalArg
122122
{
123-
Rules = [
123+
Rules =
124+
[
124125
new MetadataFile.Rule
125126
{
126127
Action = MetadataFile.Rule.ActionEnum.Allow,
127-
Features = new Dictionary<string, bool>
128-
{
129-
["has_custom_resolution"] = true
130-
}
128+
Features = new Dictionary<string, bool> { ["has_custom_resolution"] = true }
131129
}
132130
],
133131
Value =
@@ -140,14 +138,12 @@ public void ArgumentsParsingTest()
140138
},
141139
new MetadataFile.ConditionalArg
142140
{
143-
Rules = [
141+
Rules =
142+
[
144143
new MetadataFile.Rule
145144
{
146145
Action = MetadataFile.Rule.ActionEnum.Allow,
147-
Features = new Dictionary<string, bool>
148-
{
149-
["has_quick_plays_support"] = true
150-
}
146+
Features = new Dictionary<string, bool> { ["has_quick_plays_support"] = true }
151147
}
152148
],
153149
Value =
@@ -158,14 +154,12 @@ public void ArgumentsParsingTest()
158154
},
159155
new MetadataFile.ConditionalArg
160156
{
161-
Rules = [
157+
Rules =
158+
[
162159
new MetadataFile.Rule
163160
{
164161
Action = MetadataFile.Rule.ActionEnum.Allow,
165-
Features = new Dictionary<string, bool>
166-
{
167-
["is_quick_play_singleplayer"] = true
168-
}
162+
Features = new Dictionary<string, bool> { ["is_quick_play_singleplayer"] = true }
169163
}
170164
],
171165
Value =
@@ -176,14 +170,12 @@ public void ArgumentsParsingTest()
176170
},
177171
new MetadataFile.ConditionalArg
178172
{
179-
Rules = [
173+
Rules =
174+
[
180175
new MetadataFile.Rule
181176
{
182177
Action = MetadataFile.Rule.ActionEnum.Allow,
183-
Features = new Dictionary<string, bool>
184-
{
185-
["is_quick_play_multiplayer"] = true
186-
}
178+
Features = new Dictionary<string, bool> { ["is_quick_play_multiplayer"] = true }
187179
}
188180
],
189181
Value =
@@ -194,14 +186,12 @@ public void ArgumentsParsingTest()
194186
},
195187
new MetadataFile.ConditionalArg
196188
{
197-
Rules = [
189+
Rules =
190+
[
198191
new MetadataFile.Rule
199192
{
200193
Action = MetadataFile.Rule.ActionEnum.Allow,
201-
Features = new Dictionary<string, bool>
202-
{
203-
["is_quick_play_realms"] = true
204-
}
194+
Features = new Dictionary<string, bool> { ["is_quick_play_realms"] = true }
205195
}
206196
],
207197
Value =
@@ -254,6 +244,5 @@ public void ArgumentsParsingTest()
254244
}
255245
}
256246
}
257-
258247
}
259248
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using System.Runtime.InteropServices;
54
using System.Text.Json;
65
using System.Text.Json.Nodes;
76
using System.Text.Json.Serialization;
87

9-
namespace PCL2.Neo.Minecraft.Models;
8+
namespace PCL2.Neo.Models.Minecraft;
109

1110
public class MetadataFile
1211
{

0 commit comments

Comments
 (0)