| OLD | NEW |
| (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 } |
| OLD | NEW |