Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: visual_studio/NativeClientVSAddIn/UnitTests/MockProcessSearcher.cs

Issue 10836143: Refactored the VS add-in (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 namespace UnitTests 5 namespace UnitTests
6 { 6 {
7 using System;
8 using System.Collections.Generic; 7 using System.Collections.Generic;
9 using System.Management;
10 8
11 /// <summary> 9 /// <summary>
12 /// A fake process searcher that allows the list of 'processes' on the system to be faked. 10 /// A fake process searcher that allows the list of 'processes' on the system to be faked.
13 /// </summary> 11 /// </summary>
14 public class MockProcessSearcher : NativeClientVSAddIn.ProcessSearcher 12 public class MockProcessSearcher : NativeClientVSAddIn.ProcessSearcher
15 { 13 {
16 /// <summary> 14 /// <summary>
17 /// Constructs the fake process searcher. 15 /// Constructs the fake process searcher.
18 /// </summary> 16 /// </summary>
19 public MockProcessSearcher() 17 public MockProcessSearcher()
20 { 18 {
21 this.ProcessList = new List<NativeClientVSAddIn.ProcessInfo>(); 19 this.ProcessList = new List<NativeClientVSAddIn.ProcessInfo>();
22 } 20 }
23 21
24 /// <summary> 22 /// <summary>
25 /// Gets or sets the fake list of processes this MockProcessSearcher knows a bout. 23 /// Gets or sets the fake list of processes this MockProcessSearcher knows a bout.
26 /// </summary> 24 /// </summary>
27 public List<NativeClientVSAddIn.ProcessInfo> ProcessList { get; set; } 25 public List<NativeClientVSAddIn.ProcessInfo> ProcessList { get; set; }
28 26
29 /// <summary> 27 /// <summary>
30 /// This method substitutes the fake process list for the list of real syste m processes. 28 /// This method substitutes the fake process list for the list of real syste m processes.
31 /// </summary> 29 /// </summary>
32 /// <returns>Fake list of processes</returns> 30 /// <returns>Fake list of processes</returns>
33 protected override List<NativeClientVSAddIn.ProcessInfo> GetSystemProcesses( ) 31 protected override List<NativeClientVSAddIn.ProcessInfo> GetSystemProcesses( )
34 { 32 {
35 return this.ProcessList; 33 return this.ProcessList;
36 } 34 }
37 } 35 }
38 } 36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698