Ebeo / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

ContactsTest.cs uses config file values inconsistently. #358

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. It's not clear whether the "userName" parameter in unittests.dll.config 
is supposed to include the domain or is just the username. In all calls to 
ContactsQuery.CreateContactsUri, the domain is appended to the user name.  
However, whenever a RequestSettings object is created, the userName value 
is used without appending the domain.

If the userName is supposed to include the domain name, then the calls to 
the RequestSettings constructor are wrong. If the userName is *not* 
supposed to include the domain name, then the calls to CreateContactsUri 
should be updated to use the "domainName" value from the config file 
instead of hardcoding @googlemail.

2. The new sample code for 2-Legged OAuth should use the following values 
from the config file instead of hardcoding the values:
OAUTHCONSUMERKEY
OAUTHCONSUMERSECRET
OAUTHDOMAIN
OAUTHUSER

Also consider failing the test if the OAUTHDOMAIN has not been set.

Original issue reported on code.google.com by j...@connectedsw.com on 23 Mar 2010 at 8:19

GoogleCodeExporter commented 9 years ago
What sample code is hardcoding the values?

Original comment by fman...@gmail.com on 24 Mar 2010 at 8:31

GoogleCodeExporter commented 9 years ago
I changed the sample code and moved it into the oauth suite.

 The CreateContactsUri is not using oauth there (in contactstests), but client login. I am assuming right now that 
someone running the unittests uses a googlemail account for client login, i 
know. 

Original comment by fman...@gmail.com on 24 Mar 2010 at 9:18