Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.

Commit 0c3dff0

Browse files
committed
Update unit tests
1 parent e9408a9 commit 0c3dff0

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

src/InvvardDev.EZLayoutDisplay.Tests/ViewModel/AboutViewModelTest.cs

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void AboutViewModelConstructor()
2121
// Assert
2222
Assert.Equal("About EZ Layout Display", aboutViewModel.WindowTitle);
2323
Assert.Equal("EZ Layout Display", aboutViewModel.AppTitleLabel);
24-
Assert.Equal("v1.1.4", aboutViewModel.AppVersionLabel);
24+
Assert.Equal("v1.2.0", aboutViewModel.AppVersionLabel);
2525
Assert.Equal("Created by", aboutViewModel.CreatedTitleLabel);
2626
Assert.Equal("Based on", aboutViewModel.BasedOnTitleLabel);
2727
Assert.Equal("Project home", aboutViewModel.ProjectHomeTitleLabel);
@@ -31,6 +31,8 @@ public void AboutViewModelConstructor()
3131
Assert.Equal("EZ Layout Display", aboutViewModel.ProjectHomeInfoLabel);
3232
Assert.Equal("@Invvard", aboutViewModel.TwitterInfoLabel);
3333
Assert.Equal("r/EZLayoutDisplay", aboutViewModel.RedditInfoLabel);
34+
Assert.Equal("Contributors", aboutViewModel.ContributorsTitleLabel);
35+
Assert.Equal("Vlad Zaharia", aboutViewModel.VladZahariaLabel);
3436
Assert.Equal("OK", aboutViewModel.CloseButtonLabel);
3537
}
3638

@@ -54,7 +56,7 @@ [ Fact ]
5456
public void NavigateBasedOnUrl_Execute()
5557
{
5658
// Arrange
57-
var expectedUrl = "https://configure.ergodox-ez.com/layouts/default/latest/0";
59+
var expectedUrl = "https://configure.zsa.io/ergodox-ez/";
5860
var mockWindowService = new Mock<IWindowService>();
5961
var mockProcessService = new Mock<IProcessService>();
6062
mockProcessService.Setup(p => p.StartWebUrl(expectedUrl)).Verifiable();
@@ -117,5 +119,22 @@ public void NavigateRedditUrl_Execute()
117119
// Assert
118120
mockProcessService.Verify(p => p.StartWebUrl(expectedUrl));
119121
}
122+
123+
[ Fact ]
124+
public void NavigateGithubVZUrl_Execute()
125+
{
126+
// Arrange
127+
var expectedUrl = "https://github.com/vladzaharia";
128+
var mockWindowService = new Mock<IWindowService>();
129+
var mockProcessService = new Mock<IProcessService>();
130+
mockProcessService.Setup(p => p.StartWebUrl(expectedUrl)).Verifiable();
131+
132+
// Act
133+
var aboutViewModel = new AboutViewModel(mockWindowService.Object, mockProcessService.Object);
134+
aboutViewModel.NavigateGithubVZUrlCommand.Execute(null);
135+
136+
// Assert
137+
mockProcessService.Verify(p => p.StartWebUrl(expectedUrl));
138+
}
120139
}
121140
}

0 commit comments

Comments
 (0)