-
-
Notifications
You must be signed in to change notification settings - Fork 992
Expand file tree
/
Copy pathAsyncResultTest.cs
More file actions
136 lines (122 loc) · 4.66 KB
/
Copy pathAsyncResultTest.cs
File metadata and controls
136 lines (122 loc) · 4.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Renci.SshNet.Common;
using Renci.SshNet.Tests.Common;
namespace Renci.SshNet.Tests.Classes.Common
{
/// <summary>
///This is a test class for AsyncResultTest and is intended
///to contain all AsyncResultTest Unit Tests
///</summary>
[TestClass]
[Ignore] // placeholder for actual test
public class AsyncResultTest : TestBase
{
/// <summary>
///A test for EndInvoke
///</summary>
public void EndInvokeTest1Helper<TResult>()
{
var target = CreateAsyncResult<TResult>(); // TODO: Initialize to an appropriate value
var expected = default(TResult); // TODO: Initialize to an appropriate value
var actual = target.EndInvoke();
Assert.AreEqual(expected, actual);
Assert.Inconclusive("Verify the correctness of this test method.");
}
internal virtual AsyncResult<TResult> CreateAsyncResult<TResult>()
{
// TODO: Instantiate an appropriate concrete class.
AsyncResult<TResult> target = null;
return target;
}
[TestMethod]
public void EndInvokeTest1()
{
EndInvokeTest1Helper<GenericParameterHelper>();
}
/// <summary>
///A test for SetAsCompleted
///</summary>
public void SetAsCompletedTest1Helper<TResult>()
{
var target = CreateAsyncResult<TResult>(); // TODO: Initialize to an appropriate value
TResult result = default; // TODO: Initialize to an appropriate value
var completedSynchronously = false; // TODO: Initialize to an appropriate value
target.SetAsCompleted(result, completedSynchronously);
Assert.Inconclusive("A method that does not return a value cannot be verified.");
}
[TestMethod]
public void SetAsCompletedTest1()
{
SetAsCompletedTest1Helper<GenericParameterHelper>();
}
internal virtual AsyncResult CreateAsyncResult()
{
// TODO: Instantiate an appropriate concrete class.
AsyncResult target = null;
return target;
}
/// <summary>
///A test for EndInvoke
///</summary>
[TestMethod]
public void EndInvokeTest()
{
var target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
target.EndInvoke();
Assert.Inconclusive("A method that does not return a value cannot be verified.");
}
/// <summary>
///A test for SetAsCompleted
///</summary>
[TestMethod]
public void SetAsCompletedTest()
{
var target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
Exception exception = null; // TODO: Initialize to an appropriate value
var completedSynchronously = false; // TODO: Initialize to an appropriate value
target.SetAsCompleted(exception, completedSynchronously);
Assert.Inconclusive("A method that does not return a value cannot be verified.");
}
/// <summary>
///A test for AsyncState
///</summary>
[TestMethod]
public void AsyncStateTest()
{
var target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
var actual = target.AsyncState;
Assert.Inconclusive("Verify the correctness of this test method.");
}
/// <summary>
///A test for AsyncWaitHandle
///</summary>
[TestMethod]
public void AsyncWaitHandleTest()
{
var target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
var actual = target.AsyncWaitHandle;
Assert.Inconclusive("Verify the correctness of this test method.");
}
/// <summary>
///A test for CompletedSynchronously
///</summary>
[TestMethod]
public void CompletedSynchronouslyTest()
{
var target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
var actual = target.CompletedSynchronously;
Assert.Inconclusive("Verify the correctness of this test method.");
}
/// <summary>
///A test for IsCompleted
///</summary>
[TestMethod]
public void IsCompletedTest()
{
var target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
var actual = target.IsCompleted;
Assert.Inconclusive("Verify the correctness of this test method.");
}
}
}