public void StartLoadingAccountings_WhenCalled_ReturnsPartialViewResultWhereViewNameIsEqualToLoadingAccountingsPartial() { Controller sut = CreateSut(); PartialViewResult result = (PartialViewResult)sut.StartLoadingAccountings(); Assert.That(result.ViewName, Is.EqualTo("_LoadingAccountingsPartial")); }
public void StartLoadingAccountings_WhenCalled_ReturnsPartialViewResultWhereModelIsAccountingOptionsViewModel() { Controller sut = CreateSut(); PartialViewResult result = (PartialViewResult)sut.StartLoadingAccountings(); Assert.That(result.Model, Is.TypeOf <AccountingOptionsViewModel>()); }
public void StartLoadingAccountings_WhenCalled_ReturnsPartialViewResult() { Controller sut = CreateSut(); IActionResult result = sut.StartLoadingAccountings(); Assert.That(result, Is.TypeOf <PartialViewResult>()); }
public void StartLoadingAccountings_WhenCalledWithoutAccountingNumber_ReturnsPartialViewResultWhereModelIsAccountingOptionsViewModelWithoutDefaultAccountingNumber() { Controller sut = CreateSut(); PartialViewResult result = (PartialViewResult)sut.StartLoadingAccountings(); AccountingOptionsViewModel accountingOptionsViewModel = result.Model as AccountingOptionsViewModel; Assert.That(accountingOptionsViewModel, Is.Not.Null); Assert.That(accountingOptionsViewModel.DefaultAccountingNumber, Is.Null); }
public void StartLoadingAccountings_WhenCalledWithAccountingNumber_ReturnsPartialViewResultWhereModelIsAccountingOptionsViewModelWithDefaultAccountingNumberEqualToAccountingNumber() { Controller sut = CreateSut(); int accountingNumber = _fixture.Create <int>(); PartialViewResult result = (PartialViewResult)sut.StartLoadingAccountings(accountingNumber); AccountingOptionsViewModel accountingOptionsViewModel = result.Model as AccountingOptionsViewModel; Assert.That(accountingOptionsViewModel, Is.Not.Null); Assert.That(accountingOptionsViewModel.DefaultAccountingNumber, Is.EqualTo(accountingNumber)); }