public void StartUpdatingContactAccount_WhenAccountNumberIsNotNullEmptyOrWhiteSpace_ReturnsPartialViewResultWhereViewNameIsEqualToUpdatingContactAccountPartial()
        {
            Controller sut = CreateSut();

            PartialViewResult result = (PartialViewResult)sut.StartUpdatingContactAccount(_fixture.Create <int>(), _fixture.Create <string>());

            Assert.That(result.ViewName, Is.EqualTo("_UpdatingContactAccountPartial"));
        }
        public void StartUpdatingContactAccount_WhenAccountNumberIsNotNullEmptyOrWhiteSpace_ReturnsPartialViewResult()
        {
            Controller sut = CreateSut();

            IActionResult result = sut.StartUpdatingContactAccount(_fixture.Create <int>(), _fixture.Create <string>());

            Assert.That(result, Is.TypeOf <PartialViewResult>());
        }
        public void StartUpdatingContactAccount_WhenAccountNumberIsNotNullEmptyOrWhiteSpace_ReturnsPartialViewResultWhereModelIsAccountIdentificationViewModel()
        {
            Controller sut = CreateSut();

            PartialViewResult result = (PartialViewResult)sut.StartUpdatingContactAccount(_fixture.Create <int>(), _fixture.Create <string>());

            Assert.That(result.Model, Is.TypeOf <AccountIdentificationViewModel>());
        }
        public void StartUpdatingContactAccount_WhenAccountNumberIsNotNullEmptyOrWhiteSpace_ReturnsPartialViewResultWhereModelIsAccountIdentificationViewModelWithAccountingNotEqualToNull()
        {
            Controller sut = CreateSut();

            PartialViewResult result = (PartialViewResult)sut.StartUpdatingContactAccount(_fixture.Create <int>(), _fixture.Create <string>());

            AccountIdentificationViewModel accountIdentificationViewModel = (AccountIdentificationViewModel)result.Model;

            Assert.That(accountIdentificationViewModel.Accounting, Is.Not.Null);
        }
        public void StartUpdatingContactAccount_WhenAccountNumberIsWhiteSpace_ThrowsArgumentNullException()
        {
            Controller sut = CreateSut();

            ArgumentNullException result = Assert.Throws <ArgumentNullException>(() => sut.StartUpdatingContactAccount(_fixture.Create <int>(), " "));

            // ReSharper disable PossibleNullReferenceException
            Assert.That(result.ParamName, Is.EqualTo("accountNumber"));
            // ReSharper restore PossibleNullReferenceException
        }