public void should_return_user_for_username() { // given var user = "******"; var provider = new TeamcityMembershipProvider(); // when var result = provider.GetUserForUserName(user); // then Assert.That(result, Is.Not.Null); Assert.AreEqual(2, result.Groups.Group.Count); }
public void should_deserialize_user_from_json() { // given var user = "******"; var expectedUserEmail = "*****@*****.**"; var restclientStub = new RestClientMock {RestResponse = new RestResponse {Content = cannedJson}}; var provider = new TeamcityMembershipProvider(restclientStub); // when var result = provider.GetUserForUserName(user); // then Assert.That(result, Is.Not.Null); Assert.AreEqual(expectedUserEmail, result.Email); }