From 6107b19ee8f63300888eca041a64899b6c35bc5a Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Tue, 28 Mar 2023 17:10:56 +0200 Subject: [PATCH] Extend unit tests --- .../site/generatr/site/model/MenuViewModelTest.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModelTest.kt b/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModelTest.kt index adc62157..9fa2a15f 100644 --- a/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModelTest.kt +++ b/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModelTest.kt @@ -23,6 +23,7 @@ class MenuViewModelTest : ViewModelTest() { assertThat(viewModel.generalItems).containsExactly( LinkViewModel(pageViewModel, "Home", HomePageViewModel.url()), + LinkViewModel(pageViewModel, "Search", SearchViewModel.url()), ) } @@ -36,7 +37,7 @@ class MenuViewModelTest : ViewModelTest() { val pageViewModel = createPageViewModel(generatorContext) val viewModel = MenuViewModel(generatorContext, pageViewModel) - assertThat(viewModel.generalItems[1]).isEqualTo( + assertThat(viewModel.generalItems[2]).isEqualTo( LinkViewModel(pageViewModel, "Software Systems", SoftwareSystemsPageViewModel.url()) ) } @@ -56,7 +57,7 @@ class MenuViewModelTest : ViewModelTest() { val pageViewModel = createPageViewModel(generatorContext) val viewModel = MenuViewModel(generatorContext, pageViewModel) - assertThat(viewModel.generalItems[1]).isEqualTo( + assertThat(viewModel.generalItems[2]).isEqualTo( LinkViewModel(pageViewModel, "Decisions", WorkspaceDecisionsPageViewModel.url(), false) ) } @@ -73,7 +74,7 @@ class MenuViewModelTest : ViewModelTest() { val pageViewModel = createPageViewModel(generatorContext) val viewModel = MenuViewModel(generatorContext, pageViewModel) - assertThat(viewModel.generalItems.drop(1)).containsExactly( + assertThat(viewModel.generalItems.drop(2)).containsExactly( LinkViewModel(pageViewModel, "Doc 1", WorkspaceDocumentationSectionPageViewModel.url(section1)), LinkViewModel(pageViewModel, "Doc Title 2", WorkspaceDocumentationSectionPageViewModel.url(section2)) )