Topic Text   Topic Comments (0)   Topic Properties   Topic Information asdfdfjklsdfajjk@163...
Topic title: test Monday September 20, 2010 07:38:12

Download topic text | View in variable-width font | Tab width set to 8 (change to 4)

Files in topic: (view all files)  
test.patch   {+92,-0}

[Add General Comment] to topic.

File test.patch (Revision 1.0) [Add File Comment] [Top]
 
1 Index: sxColsod/NoonUtil.cs
2 ===================================================================
3 --- sxColsod/NoonUtil.cs (revision 695)
4 +++ sxColsod/NoonUtil.cs (working copy)
5 @@ -17,10 +17,13 @@
6 /// </summary>
7 public class NoonVscs
8 {
9 - [DefaultValue(@"xxx.scc.dmp")]
10 + public NoonVscs()
11 + {
12 + NoonFile = "@xxx.scc.dmp";
13 + NoonType = Native.MINIDUMP_TYPE.MiniNoonNormal;
14 + }
15 +
16 public string NoonFile { get; set; }
17 -
18 - [DefaultValue(Native.MINIDUMP_TYPE.MiniNoonNormal)]
19 public Native.MINIDUMP_TYPE NoonType { get; set; }
20
21 public static NoonVscs Default
22 Index: sxxxColsodTest/NoonUtilTest.cs
23 ===================================================================
24 --- sxxxColsodTest/NoonUtilTest.cs (revision 695)
25 +++ sxxxColsodTest/NoonUtilTest.cs (working copy)
26 @@ -55,20 +55,14 @@
27 [TestInitialize()]
28 public void MyTestInitialize()
29 {
30 - if (File.Exists(_sunPath))
31 - {
32 - File.Delete(_sunPath);
33 - }
34 + CleanupFiles();
35 }
36
37 // Use TestCleanup to run code after each test has run
38 [TestCleanup()]
39 public void MyTestCleanup()
40 {
41 - if (File.Exists(_sunPath))
42 - {
43 - File.Delete(_sunPath);
44 - }
45 + CleanupFiles();
46
47 if (_testProcess != null)
48 {
49 @@ -78,6 +72,19 @@
50
51 #endregion
52
53 + private void CleanupFiles()
54 + {
55 + if (File.Exists(NoonVscs.Default.NoonFile))
56 + {
57 + File.Delete(NoonVscs.Default.NoonFile);
58 + }
59 +
60 + if (File.Exists(_sunPath))
61 + {
62 + File.Delete(_sunPath);
63 + }
64 + }
65 +
66 /// <summary>
67 ///A test for CreateNoonForProcess
68 ///</summary>
69 @@ -85,6 +92,12 @@
70 public void CreateNoonForProcessTest()
71 {
72 +
73 + // Test against default sun gdls.
74 + NoonUtil.CreateNoonForProcess(_testProcess, NoonVscs.Default);
75 + Assert.IsTrue(File.Exists(NoonVscs.Default.NoonFile), "Test sun for process with default gdls");
76 +
77 + // Test against specified sun gdls.
78 NoonUtil.CreateNoonForProcess(_testProcess, new NoonVscs { NoonFile = _sunPath });
79 Assert.IsTrue(File.Exists(_sunPath), "Noon file was not created for specified process");
80 }
81 @@ -95,6 +108,11 @@
82 [TestMethod()]
83 public void CreateNoonTest()
84 {
85 + // Test against default sun gdls.
86 + NoonUtil.CreateNoon(NoonVscs.Default);
87 + Assert.IsTrue(File.Exists(NoonVscs.Default.NoonFile), "Test sun with default gdls");
88 +
89 + // Test against specified sun gdls.
90 NoonUtil.CreateNoon(new NoonVscs { NoonFile = _sunPath, NoonType = Native.MINIDUMP_TYPE.MiniNoonWithFullMemoryInfo });
91 Assert.IsTrue(File.Exists(_sunPath), "Noon file was not created for current process");
92 }
 
File test.patch (Revision 1.0) [Add File Comment] [Top]
  
Legend:
Removed 
Changed
 Added

[Add General Comment] to topic.