forked from DST-Tools/DSTEd-C
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ProjectTest.cs
42 lines (37 loc) · 1.02 KB
/
ProjectTest.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Reflection;
using DSTEd.Core.ProjectManager;
using System.IO;
using DSTEd.Core.IO.EnumerableFileSystem;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace DSTEd.Test.ProjectManager
{
[TestClass]
public class ProjectTest
{
//private static Core.ProjectManager.ProjectManager projmgr = new Core.ProjectManager.ProjectManager(".\\Projects");
/*[TestMethod]
public void FromTemplate()
{
}*/
[TestMethod]
public void ReadTemplate()
{
ProjectTemplateInfo test_template = ProjectTemplateInfo.Deserialize(new DirectoryInfo(".\\Project Templates\\Test template"));
Assert.AreEqual(test_template.Name, "TestTemplate");
//read private member by reflection
List<FileInfo> files =
typeof(ProjectTemplateInfo).GetField("files",
BindingFlags.Instance | BindingFlags.NonPublic).GetValue(test_template) as List<FileInfo>;
foreach (FileInfo file in files)
{
//Assert
}
}
/*[TestMethod]
public void ReadProject()
{
}*/
}
}