private static AppBuildMessagesListViewModel GetViewModelWithOneMessageForEachIssueType()
        {
            var messagesList = new AppBuildMessagesListViewModel();

            messagesList.AddMessage(AppBuilderTestExtensions.AsBuildTestWarning("Test warning"));
            messagesList.AddMessage(AppBuilderTestExtensions.AsBuildTestError("Test error"));
            return(messagesList);
        }
        public void CheckDataForWarningMessage()
        {
            const string    WarningText             = "A bug but not crash";
            AppBuildMessage warningMessage          = AppBuilderTestExtensions.AsBuildTestWarning(WarningText);
            var             warningMessageViewModel = new AppBuildMessageViewModel(warningMessage);

            Assert.IsTrue(warningMessageViewModel.ImagePath.Contains("Warning"));
            AssertMessageTextAndProjectWithFileData(WarningText, warningMessageViewModel);
            AssertMessageIsoData(warningMessageViewModel);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 5
0
 public void RaiseAppBuildWarning(string message)
 {
     ReceiveData(AppBuilderTestExtensions.AsBuildTestWarning(message));
 }