I have question what I should test, controllers or models? For example i want test user registration. Registration include some actions for inserting additional data to tables and set user status by input data.
I'm create new application with Internet template, have UserProfile class, RegisterModel class and etc. In controller code registration use WebSecurity class.
WebSecurity.CreateUserAndAccount(this.Email, this.Password);
WebSecurity.Login(this.Email, this.Password);
Roles.AddUsersToRole(new[] { this.Email }, FSUserRoles.NotValided.ToString());
All guides writing to create Repository class, but how it can be applied to code above?
Aucun commentaire:
Enregistrer un commentaire