FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Process.NET/test/Process.NET.Test/Core/ProcessSharpTest.cs at master · ywscr/Process.NET · GitHub
ywscr
Process.NET
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Process.NET
/
test
/
Process.NET.Test
/
Core
/
ProcessSharpTest.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (22 loc) · 999 Bytes
Breadcrumbs
Process.NET
/
test
/
Process.NET.Test
/
Core
/
ProcessSharpTest.cs
Copy path
File metadata and controls
24 lines (22 loc) · 999 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using
NUnit
.
Framework
;
namespace
Process
.
NET
.
Test
{
[
TestFixture
]
public
class
ProcessSharpTest
{
[
Test
]
public
void
TestLocalMemory
(
)
{
var
process
=
new
ProcessSharp
(
System
.
Diagnostics
.
Process
.
GetCurrentProcess
(
)
,
Memory
.
MemoryType
.
Local
)
;
Assert
.
That
(
process
.
Memory
.
GetType
(
)
==
typeof
(
Memory
.
LocalProcessMemory
)
,
"Failed to find LocalProcessMemory given MemoryType.Local"
)
;
}
[
Test
]
public
void
TestRemoteMemory
(
)
{
System
.
Diagnostics
.
Process
[
]
processes
=
System
.
Diagnostics
.
Process
.
GetProcessesByName
(
"notepad++"
)
;
Assert
.
Greater
(
processes
.
Length
,
0
,
"Failed to find a running instance of Notepad++."
)
;
var
process
=
new
ProcessSharp
(
processes
[
0
]
,
Process
.
NET
.
Memory
.
MemoryType
.
Remote
)
;
Assert
.
That
(
process
.
Memory
.
GetType
(
)
==
typeof
(
Memory
.
ExternalProcessMemory
)
,
"Failed to find ExternalProcessMemory given MemoryType.Remote"
)
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL