TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anusha Popuri
NA
5
10.6k
NUnit Testing for User Authentication of Login Form
Aug 23 2013 3:24 AM
Hi,
Here is my code for button login..i m not getting how to implement nunit test code.could you please help me.
IUserService iservice = this.channel.CreateChannel();
string token = iservice.AuthenticateUser(this.txtUserName.Text, this.txtPwd.Text);
EndpointAddressBuilder builder = new EndpointAddressBuilder(this.channel.Endpoint.Address);
AddressHeader header = AddressHeader.CreateAddressHeader("token", "", token);
builder.Headers.Add(header);
LoginUtility.EndPoint = builder.ToEndpointAddress();
this.channel = new ChannelFactory<IUserService>(binding, LoginUtility.EndPoint);
iservice = this.channel.CreateChannel();
User response = iservice.GetUserInfoByLoginId(this.txtUserName.Text);
LoginUtility.UserID = response.UserID;
LoginUtility.UserType = response.Type;
Thank you,
Anusha.
Reply
Answers (
1
)
Query
MCTS : Windows Application Development