|
1 | | -using Newtonsoft.Json.Linq; |
2 | | -using System; |
3 | | -using System.IO; |
4 | | - |
5 | | -namespace Zametek.Data.ProjectPlan.Tests |
6 | | -{ |
7 | | - public class ConverterFixture |
8 | | - : IDisposable |
9 | | - { |
10 | | - public ConverterFixture() |
11 | | - { |
12 | | - V0_1_0_JsonString = ReadJsonFile(@"TestFiles\test_v0_1_0.zpp"); |
13 | | - V0_2_0_JsonString = ReadJsonFile(@"TestFiles\test_v0_2_0.zpp"); |
14 | | - V0_2_1_JsonString = ReadJsonFile(@"TestFiles\test_v0_2_1.zpp"); |
15 | | - V0_3_0_JsonString = ReadJsonFile(@"TestFiles\test_v0_3_0.zpp"); |
16 | | - V0_3_1_JsonString = ReadJsonFile(@"TestFiles\test_v0_3_1.zpp"); |
17 | | - V0_3_2_JsonString = ReadJsonFile(@"TestFiles\test_v0_3_2.zpp"); |
18 | | - V0_3_2a_JsonString = ReadJsonFile(@"TestFiles\test_v0_3_2a.zpp"); |
19 | | - V0_4_0a_JsonString = ReadJsonFile(@"TestFiles\test_v0_4_0a.zpp"); |
20 | | - V0_4_0b_JsonString = ReadJsonFile(@"TestFiles\test_v0_4_0b.zpp"); |
21 | | - V0_4_1b_JsonString = ReadJsonFile(@"TestFiles\test_v0_4_1b.zpp"); |
22 | | - V0_4_1c_JsonString = ReadJsonFile(@"TestFiles\test_v0_4_1c.zpp"); |
23 | | - V0_4_2c_JsonString = ReadJsonFile(@"TestFiles\test_v0_4_2c.zpp"); |
24 | | - V0_4_2d_JsonString = ReadJsonFile(@"TestFiles\test_v0_4_2d.zpp"); |
25 | | - V0_4_3d_JsonString = ReadJsonFile(@"TestFiles\test_v0_4_3d.zpp"); |
26 | | - V0_4_4d_JsonString = ReadJsonFile(@"TestFiles\test_v0_4_4d.zpp"); |
27 | | - V0_5_0_JsonString = ReadJsonFile(@"TestFiles\test_v0_5_0.zpp"); |
28 | | - V0_5_0a_JsonString = ReadJsonFile(@"TestFiles\test_v0_5_0a.zpp"); |
29 | | - V0_6_0_JsonString = ReadJsonFile(@"TestFiles\test_v0_6_0.zpp"); |
30 | | - |
31 | | - static string ReadJsonFile(string filename) |
32 | | - { |
33 | | - using StreamReader reader = File.OpenText(filename); |
34 | | - string content = reader.ReadToEnd(); |
35 | | - JObject json = JObject.Parse(content); |
36 | | - return json.ToString(); |
37 | | - } |
38 | | - } |
39 | | - |
40 | | - public string V0_1_0_JsonString { get; init; } |
41 | | - public string V0_2_0_JsonString { get; init; } |
42 | | - public string V0_2_1_JsonString { get; init; } |
43 | | - public string V0_3_0_JsonString { get; init; } |
44 | | - public string V0_3_1_JsonString { get; init; } |
45 | | - public string V0_3_2_JsonString { get; init; } |
46 | | - public string V0_3_2a_JsonString { get; init; } |
47 | | - public string V0_4_0a_JsonString { get; init; } |
48 | | - public string V0_4_0b_JsonString { get; init; } |
49 | | - public string V0_4_1b_JsonString { get; init; } |
50 | | - public string V0_4_1c_JsonString { get; init; } |
51 | | - public string V0_4_2c_JsonString { get; init; } |
52 | | - public string V0_4_2d_JsonString { get; init; } |
53 | | - public string V0_4_3d_JsonString { get; init; } |
54 | | - public string V0_4_4d_JsonString { get; init; } |
55 | | - public string V0_5_0_JsonString { get; init; } |
56 | | - public string V0_5_0a_JsonString { get; init; } |
57 | | - public string V0_6_0_JsonString { get; init; } |
58 | | - |
59 | | - public void Dispose() |
60 | | - { |
61 | | - } |
62 | | - } |
63 | | -} |
| 1 | +using Newtonsoft.Json.Linq; |
| 2 | +using System; |
| 3 | +using System.IO; |
| 4 | + |
| 5 | +namespace Zametek.Data.ProjectPlan.Tests |
| 6 | +{ |
| 7 | + public class ConverterFixture |
| 8 | + : IDisposable |
| 9 | + { |
| 10 | + public ConverterFixture() |
| 11 | + { |
| 12 | + V0_1_0_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_1_0.zpp")); |
| 13 | + V0_2_0_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_2_0.zpp")); |
| 14 | + V0_2_1_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_2_1.zpp")); |
| 15 | + V0_3_0_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_3_0.zpp")); |
| 16 | + V0_3_1_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_3_1.zpp")); |
| 17 | + V0_3_2_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_3_2.zpp")); |
| 18 | + V0_3_2a_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_3_2a.zpp")); |
| 19 | + V0_4_0a_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_4_0a.zpp")); |
| 20 | + V0_4_0b_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_4_0b.zpp")); |
| 21 | + V0_4_1b_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_4_1b.zpp")); |
| 22 | + V0_4_1c_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_4_1c.zpp")); |
| 23 | + V0_4_2c_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_4_2c.zpp")); |
| 24 | + V0_4_2d_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_4_2d.zpp")); |
| 25 | + V0_4_3d_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_4_3d.zpp")); |
| 26 | + V0_4_4d_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_4_4d.zpp")); |
| 27 | + V0_5_0_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_5_0.zpp")); |
| 28 | + V0_5_0a_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_5_0a.zpp")); |
| 29 | + V0_6_0_JsonString = ReadJsonFile(Path.Combine("TestFiles", "test_v0_6_0.zpp")); |
| 30 | + |
| 31 | + static string ReadJsonFile(string filename) |
| 32 | + { |
| 33 | + using StreamReader reader = File.OpenText(filename); |
| 34 | + string content = reader.ReadToEnd(); |
| 35 | + JObject json = JObject.Parse(content); |
| 36 | + return json.ToString(); |
| 37 | + } |
| 38 | + } |
| 39 | + |
| 40 | + public string V0_1_0_JsonString { get; init; } |
| 41 | + public string V0_2_0_JsonString { get; init; } |
| 42 | + public string V0_2_1_JsonString { get; init; } |
| 43 | + public string V0_3_0_JsonString { get; init; } |
| 44 | + public string V0_3_1_JsonString { get; init; } |
| 45 | + public string V0_3_2_JsonString { get; init; } |
| 46 | + public string V0_3_2a_JsonString { get; init; } |
| 47 | + public string V0_4_0a_JsonString { get; init; } |
| 48 | + public string V0_4_0b_JsonString { get; init; } |
| 49 | + public string V0_4_1b_JsonString { get; init; } |
| 50 | + public string V0_4_1c_JsonString { get; init; } |
| 51 | + public string V0_4_2c_JsonString { get; init; } |
| 52 | + public string V0_4_2d_JsonString { get; init; } |
| 53 | + public string V0_4_3d_JsonString { get; init; } |
| 54 | + public string V0_4_4d_JsonString { get; init; } |
| 55 | + public string V0_5_0_JsonString { get; init; } |
| 56 | + public string V0_5_0a_JsonString { get; init; } |
| 57 | + public string V0_6_0_JsonString { get; init; } |
| 58 | + |
| 59 | + public void Dispose() |
| 60 | + { |
| 61 | + } |
| 62 | + } |
| 63 | +} |
0 commit comments