1
using Google.GData.Client;
3
using Google.GData.Client.UnitTests;
10
namespace Google.GData.Client.UnitTests.Core
15
///This is a test class for GDataGAuthRequestFactoryTest and is intended
16
///to contain all GDataGAuthRequestFactoryTest Unit Tests
18
[TestFixture][Category("CoreClient")]
19
public class GDataGAuthRequestFactoryTest
23
private TestContext testContextInstance;
26
///Gets or sets the test context which provides
27
///information about and functionality for the current test run.
29
public TestContext TestContext
33
return testContextInstance;
37
testContextInstance = value;
41
#region Additional test attributes
43
//You can use the following additional attributes as you write your tests:
45
//Use ClassInitialize to run code before running the first test in the class
47
//public static void MyClassInitialize(TestContext testContext)
51
//Use ClassCleanup to run code after all tests in a class have run
53
//public static void MyClassCleanup()
57
//Use TestInitialize to run code before running each test
59
//public void MyTestInitialize()
63
//Use TestCleanup to run code after each test has run
65
//public void MyTestCleanup()
73
///A test for UserAgent
76
public void UserAgentTest()
78
string service = "TestValue"; // TODO: Initialize to an appropriate value
79
string applicationName = "TestValue"; // TODO: Initialize to an appropriate value
80
GDataGAuthRequestFactory target = new GDataGAuthRequestFactory(service, applicationName); // TODO: Initialize to an appropriate value
81
string expected = "TestValue";
83
target.UserAgent = expected;
84
actual = target.UserAgent;
85
Assert.AreEqual(expected, actual);
89
///A test for StrictRedirect
92
public void StrictRedirectTest()
94
string service = "TestValue"; // TODO: Initialize to an appropriate value
95
string applicationName = "TestValue"; // TODO: Initialize to an appropriate value
96
GDataGAuthRequestFactory target = new GDataGAuthRequestFactory(service, applicationName); // TODO: Initialize to an appropriate value
97
bool expected = true; // TODO: Initialize to an appropriate value
99
target.StrictRedirect = expected;
100
actual = target.StrictRedirect;
101
Assert.AreEqual(expected, actual);
105
///A test for Service
108
public void ServiceTest()
110
string service = "TestValue"; // TODO: Initialize to an appropriate value
111
string applicationName = "TestValue"; // TODO: Initialize to an appropriate value
112
GDataGAuthRequestFactory target = new GDataGAuthRequestFactory(service, applicationName); // TODO: Initialize to an appropriate value
113
string expected = "TestValue";
115
target.Service = expected;
116
actual = target.Service;
117
Assert.AreEqual(expected, actual);
121
///A test for NumberOfRetries
124
public void NumberOfRetriesTest()
126
string service = "TestValue"; // TODO: Initialize to an appropriate value
127
string applicationName = "TestValue"; // TODO: Initialize to an appropriate value
128
GDataGAuthRequestFactory target = new GDataGAuthRequestFactory(service, applicationName); // TODO: Initialize to an appropriate value
129
int expected = 2; // TODO: Initialize to an appropriate value
131
target.NumberOfRetries = expected;
132
actual = target.NumberOfRetries;
133
Assert.AreEqual(expected, actual);
137
///A test for MethodOverride
140
public void MethodOverrideTest()
142
string service = "TestValue"; // TODO: Initialize to an appropriate value
143
string applicationName = "TestValue"; // TODO: Initialize to an appropriate value
144
GDataGAuthRequestFactory target = new GDataGAuthRequestFactory(service, applicationName); // TODO: Initialize to an appropriate value
145
bool expected = true; // TODO: Initialize to an appropriate value
147
target.MethodOverride = expected;
148
actual = target.MethodOverride;
149
Assert.AreEqual(expected, actual);
153
///A test for Handler
156
public void HandlerTest()
158
string service = "TestValue"; // TODO: Initialize to an appropriate value
159
string applicationName = "TestValue"; // TODO: Initialize to an appropriate value
160
GDataGAuthRequestFactory target = new GDataGAuthRequestFactory(service, applicationName); // TODO: Initialize to an appropriate value
161
string expected = "TestValue";
163
target.Handler = expected;
164
actual = target.Handler;
165
Assert.AreEqual(expected, actual);
169
///A test for GAuthToken
172
public void GAuthTokenTest()
174
string service = "TestValue"; // TODO: Initialize to an appropriate value
175
string applicationName = "TestValue"; // TODO: Initialize to an appropriate value
176
GDataGAuthRequestFactory target = new GDataGAuthRequestFactory(service, applicationName); // TODO: Initialize to an appropriate value
177
string expected = "TestValue";
179
target.GAuthToken = expected;
180
actual = target.GAuthToken;
181
Assert.AreEqual(expected, actual);
185
///A test for CaptchaToken
188
public void CaptchaTokenTest()
190
string service = "TestValue"; // TODO: Initialize to an appropriate value
191
string applicationName = "TestValue"; // TODO: Initialize to an appropriate value
192
GDataGAuthRequestFactory target = new GDataGAuthRequestFactory(service, applicationName); // TODO: Initialize to an appropriate value
193
string expected = "TestValue";
195
target.CaptchaToken = expected;
196
actual = target.CaptchaToken;
197
Assert.AreEqual(expected, actual);
201
///A test for CaptchaAnswer
204
public void CaptchaAnswerTest()
206
string service = "TestValue"; // TODO: Initialize to an appropriate value
207
string applicationName = "TestValue"; // TODO: Initialize to an appropriate value
208
GDataGAuthRequestFactory target = new GDataGAuthRequestFactory(service, applicationName); // TODO: Initialize to an appropriate value
209
string expected = "TestValue";
211
target.CaptchaAnswer = expected;
212
actual = target.CaptchaAnswer;
213
Assert.AreEqual(expected, actual);
217
///A test for ApplicationName
220
public void ApplicationNameTest()
222
string service = "TestValue"; // TODO: Initialize to an appropriate value
223
string applicationName = "TestValue"; // TODO: Initialize to an appropriate value
224
GDataGAuthRequestFactory target = new GDataGAuthRequestFactory(service, applicationName); // TODO: Initialize to an appropriate value
225
string expected = "TestValue";
227
target.ApplicationName = expected;
228
actual = target.ApplicationName;
229
Assert.AreEqual(expected, actual);
233
///A test for AccountType
236
public void AccountTypeTest()
238
string service = "TestValue"; // TODO: Initialize to an appropriate value
239
string applicationName = "TestValue"; // TODO: Initialize to an appropriate value
240
GDataGAuthRequestFactory target = new GDataGAuthRequestFactory(service, applicationName); // TODO: Initialize to an appropriate value
241
string expected = "TestValue";
243
target.AccountType = expected;
244
actual = target.AccountType;
245
Assert.AreEqual(expected, actual);