public void LoginCommandExecuted_CollectorDoesUserExistReturnsTrue_MessageServiceShowErrorNOTCalled() { _collector.DoesUserExist("", "").ReturnsForAnyArgs(true); _sut.UserName = "******"; _sut.Password = "******"; _sut.LoginCommand.Execute(null); _messageService.DidNotReceive().ShowError("Wrong username or password"); }
public void TryValidate_ShouldNotShowMessageBox_WhenPatternIsNotNullOrEmpty() { IMessageBoxService messageBoxService = Substitute.For <IMessageBoxService>(); mSut.TryValidate(messageBoxService); messageBoxService.DidNotReceive().ShowError(Arg.Any <string>()); }
public void TryValidate_ShouldSucceed_WhenValueIsNotNullOrEmpty() { mSut.Value = "whatev"; IMessageBoxService messageBoxService = Substitute.For <IMessageBoxService>(); Assert.IsTrue(mSut.TryValidate(messageBoxService)); messageBoxService.DidNotReceive().ShowError(Arg.Any <string>()); }
public void TryValidate_ShouldSucceed(string value) { mSut.Value = value; IMessageBoxService messageBoxService = Substitute.For <IMessageBoxService>(); Assert.IsTrue(mSut.TryValidate(messageBoxService)); messageBoxService.DidNotReceive().ShowError(Arg.Any <string>()); }
public void TryValidate_ShouldSucceed_WhenFilePathIsSpecified() { mSut.FilePath = "filepath"; IMessageBoxService messageBoxService = Substitute.For <IMessageBoxService>(); Assert.IsTrue(mSut.TryValidate(messageBoxService)); messageBoxService.DidNotReceive().ShowError(Arg.Any <string>()); }
public void TryValidate_ShouldNotShowUnassignedMessageBox_WhenValueIsNotNullOrEmpty_AndReturnTrue() { mSut.Value = "name"; IMessageBoxService messageBoxService = Substitute.For <IMessageBoxService>(); Assert.IsTrue(mSut.TryValidate(messageBoxService)); messageBoxService.DidNotReceive().ShowError(Arg.Any <string>()); }
public void TryValidate_ShouldNotShowCollisionMessageBox_WhenAppenderNameCollides_ButIsSameAppender() { mSut.Load(mOriginalAppender); IMessageBoxService messageBoxService = Substitute.For <IMessageBoxService>(); Assert.IsTrue(mSut.TryValidate(messageBoxService)); messageBoxService.DidNotReceive().ShowError(Arg.Any <string>()); }
public void TryValidate_ShouldNotShowCollisionMessageBox_WhenOtherAppenderHasNoName() { mSut.Value = "appName"; mXmlDoc.CreateElement("appender").AppendTo(mLog4NetNode); IMessageBoxService messageBoxService = Substitute.For <IMessageBoxService>(); Assert.IsTrue(mSut.TryValidate(messageBoxService)); messageBoxService.DidNotReceive().ShowError(Arg.Any <string>()); }
public void TryValidate_ShouldNotShowCollisionMessageBox_WhenNoAppenderNamesCollide() { mSut.Value = OriginalName; mXmlDoc.CreateElementWithAttribute("appender", "name", "otherName").AppendTo(mLog4NetNode); IMessageBoxService messageBoxService = Substitute.For <IMessageBoxService>(); Assert.IsTrue(mSut.TryValidate(messageBoxService)); messageBoxService.DidNotReceive().ShowError(Arg.Any <string>()); }
public void TryValidate_ShouldNotCallShowError() { Sut.Value = "1234"; IMessageBoxService messageBoxService = Substitute.For <IMessageBoxService>(); Sut.TryValidate(messageBoxService); messageBoxService.DidNotReceive().ShowError(Arg.Any <string>()); }