Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

Commit

Permalink
add test to ensure update was called
Browse files Browse the repository at this point in the history
  • Loading branch information
brockallen committed Feb 10, 2015
1 parent 40179d5 commit 6b994a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ public void CloseAccount_ClosesAccount()
Assert.IsTrue(acct.IsAccountClosed);
Assert.IsNotNull(acct.AccountClosed);
Assert.AreEqual(now, acct.AccountClosed.Value);
Assert.IsTrue(repository.UpdateWasCalled);
}

[TestMethod]
Expand Down Expand Up @@ -2484,5 +2485,7 @@ public void Logging_in_before_account_is_verified_does_not_cause_account_to_have
}




}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ protected internal override void AddClaim(UserClaim item)

public class FakeUserAccountRepository : QueryableUserAccountRepository<UserAccount>, IUserAccountRepository
{
public bool UpdateWasCalled { get; set; }

public FakeUserAccountRepository()
{
this.UseEqualsOrdinalIgnoreCaseForQueries = true;
Expand Down Expand Up @@ -43,6 +45,7 @@ public override void Remove(UserAccount item)

public override void Update(UserAccount item)
{
UpdateWasCalled = true;
}

public override UserAccount GetByLinkedAccount(string tenant, string provider, string id)
Expand Down

0 comments on commit 6b994a7

Please # to comment.