public void WindowSnap_OnWindowStateNormalWindowBorderThicknessChange_NewThicknessEqualsZero() { // Arrange ITerminalContext context = new TestTerminalContext(); context.UserAccount = new UserPublic() { ID = 1, FirstName = "Adam", LastName = "A", OAuthID = "12345" }; MainWindowViewModel viewModel = new MainWindowViewModel(context); var thread = new Thread(() => { WindowModel windowModel = new WindowModel() { OpenedWindow = new Window() }; context.WindowManager.OpenedViews.Add(nameof(MainWindowViewModel), windowModel); // ACT viewModel.WindowSnap(); // ASSERT viewModel.GetWindowHandler().OpenedWindow.BorderThickness.Should().BeEquivalentTo(new Thickness(0)); }); thread.SetApartmentState(ApartmentState.STA); thread.Start(); thread.Join(); }
public void WindowSnap_OnWindowStateNormalRestoreButtonContentChange_NewContentEqualsRestore() { // Arrange ITerminalContext context = new TestTerminalContext(); context.UserAccount = new UserPublic() { ID = 1, FirstName = "Adam", LastName = "A", OAuthID = "12345" }; MainWindowViewModel viewModel = new MainWindowViewModel(context); var thread = new Thread(() => { WindowModel windowModel = new WindowModel() { OpenedWindow = new Window() }; context.WindowManager.OpenedViews.Add(nameof(MainWindowViewModel), windowModel); // ACT viewModel.WindowSnap(); // ASSERT viewModel.RestoreButtonContent.Should().Be("\xE739"); }); thread.SetApartmentState(ApartmentState.STA); thread.Start(); thread.Join(); }
public async Task AuthenticateWithMicrosoftAsync() { // Arrange ITerminalContext context = new TestTerminalContext(); LoginWindowViewModel viewModel = new LoginWindowViewModel(context); // Act // Assert }