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

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

Issue 10758009: Native Client Visual Studio Add-in (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 namespace UnitTests
6 {
7 using System;
8 using System.Collections.Generic;
9 using System.Management;
10
11 /// <summary>
12 /// A fake process searcher that allows the list of 'processes' on the system to be faked.
13 /// </summary>
14 public class MockProcessSearcher : NativeClientVSAddIn.ProcessSearcher
15 {
16 /// <summary>
17 /// Constructs the fake process searcher.
18 /// </summary>
19 public MockProcessSearcher()
20 {
21 this.ProcessList = new List<NativeClientVSAddIn.ProcessInfo>();
22 }
23
24 /// <summary>
25 /// Gets or sets the fake list of processes this MockProcessSearcher knows a bout.
26 /// </summary>
27 public List<NativeClientVSAddIn.ProcessInfo> ProcessList { get; set; }
28
29 /// <summary>
30 /// This method substitutes the fake process list for the list of real syste m processes.
31 /// </summary>
32 /// <returns>Fake list of processes</returns>
33 protected override List<NativeClientVSAddIn.ProcessInfo> GetSystemProcesses( )
34 {
35 return this.ProcessList;
36 }
37 }
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698