private static AppBuildMessagesListViewModel GetViewModelWithOneMessageForEachIssueType() { var messagesList = new AppBuildMessagesListViewModel(); messagesList.AddMessage(AppBuilderTestExtensions.AsBuildTestWarning("Test warning")); messagesList.AddMessage(AppBuilderTestExtensions.AsBuildTestError("Test error")); return(messagesList); }
public void ShowViewWithWithDummyMessages() { var listViewModel = CreateViewModelWithDummyMessages(); var window = CreateVerifiableWindowFromViewModel(listViewModel); listViewModel.AddMessage( AppBuilderTestExtensions.AsBuildTestError("This error was added later")); window.ShowDialog(); }
public void CheckDataForErrorMessage() { const string ErrorText = "A bad crash"; AppBuildMessage errorMessage = AppBuilderTestExtensions.AsBuildTestError(ErrorText); var errorMessageViewModel = new AppBuildMessageViewModel(errorMessage); Assert.IsTrue(errorMessageViewModel.ImagePath.Contains("Error")); AssertMessageTextAndProjectWithFileData(ErrorText, errorMessageViewModel); AssertMessageIsoData(errorMessageViewModel); }
private static AppBuildMessagesListViewModel CreateViewModelWithDummyMessages() { var listViewModel = new AppBuildMessagesListViewModel(); listViewModel.AddMessage( AppBuilderTestExtensions.AsBuildTestWarning("A simple build warning")); listViewModel.AddMessage( AppBuilderTestExtensions.AsBuildTestError("A simple build error")); listViewModel.AddMessage( AppBuilderTestExtensions.AsBuildTestError("A second simple build error")); return(listViewModel); }
public void AddDifferentMessages() { var messagesList = new AppBuildMessagesListViewModel(); messagesList.AddMessage( AppBuilderTestExtensions.AsBuildTestWarning("A test warning for this test")); messagesList.AddMessage( AppBuilderTestExtensions.AsBuildTestError("A test error for this test")); messagesList.AddMessage( AppBuilderTestExtensions.AsBuildTestError("Just another test error for this test")); Assert.AreEqual(1, messagesList.Warnings.Count); Assert.AreEqual("1 Warning", messagesList.TextOfWarningCount); Assert.AreEqual(2, messagesList.Errors.Count); Assert.AreEqual("2 Errors", messagesList.TextOfErrorCount); }
public void ReceiveSomeTestMessages() { RaiseAppBuildWarning("A BuildWarning"); ReceiveData(AppBuilderTestExtensions.AsBuildTestError("A BuildError")); }