public void IsSatisfiedBy_UserIsBackgroundworkerUser_False()
 {
     var target = new UserCanBeRemovedSpec(2);
     Assert.IsFalse(target.IsSatisfiedBy(new User() { Id = 2 }));
     Assert.AreEqual(Texts.SpecialUserCannotBeRemoved.With(UserService.BackgroundWokerUserName), target.NotSatisfiedReason);
 }
 public void IsSatisfiedBy_UserExists_True()
 {
     var target = new UserCanBeRemovedSpec(1);
     Assert.IsTrue(target.IsSatisfiedBy(new User() { UserName = "******" }));
 }
 public void IsSatisfiedBy_UserIsAdmin_False()
 {
     var target = new UserCanBeRemovedSpec(1);
     Assert.IsFalse(target.IsSatisfiedBy(new User() { Id = 1 }));
     Assert.AreEqual(Texts.SpecialUserCannotBeRemoved.With(UserService.AdminUserName), target.NotSatisfiedReason);
 }
 public void IsSatisfiedBy_UserDoesNotExists_False()
 {
     var target = new UserCanBeRemovedSpec(1);
     Assert.IsFalse(target.IsSatisfiedBy(null));
     Assert.AreEqual(Texts.UserWithIdDoNotExists.With(1), target.NotSatisfiedReason);
 }