Guest User

Untitled

a guest
Sep 15th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. ViewModel Not Failing Validation in Specflow Test
  2. Scenario: Creating a User without enough information
  3. Given I am logged on as an 'Admin'
  4. When I create the following Users:
  5. | Username | Password |
  6. | username | |
  7. Then I should not see any Users
  8.  
  9. [When(@"I create the following Users:")]
  10. public void WhenICreateTheFollowingUsers(Table table)
  11. {
  12. foreach (var row in table.RowHelper())
  13. {
  14. var userFormViewModel = new UserFormViewModel
  15. {
  16. UserName = row["Username"],
  17. Password = row["Password"]
  18. };
  19.  
  20. UserController.Create(userFormViewModel);
  21. }
  22. }
Add Comment
Please, Sign In to add comment