public void Dev2Dialogue_NullTitleDesciptionImageSource_ValidDescriptionTitle_Expected_CreatedWithOnlyDescriptionTitleText() { IDialogueViewModel dev2Dialogue = new DialogueViewModel(); dev2Dialogue.SetupDialogue(null, null, null, "SomeTitleText"); Assert.IsFalse(string.IsNullOrEmpty(dev2Dialogue.DescriptionTitleText)); // cleanup - Dispose of the dev2Dialogue dev2Dialogue.Dispose(); }
public void Dev2Dialogue_NullImageSource_ValidTitleDescriptionDescriptionTitle_Expected_NullImageReference() { IDialogueViewModel dev2Dialogue = new DialogueViewModel(); dev2Dialogue.SetupDialogue("Test Title", "Test Description", null, "SomeTitleText"); Assert.IsTrue(dev2Dialogue.ImageSource == null); // cleanup - Dispose of the dev2Dialogue dev2Dialogue.Dispose(); }
public void Dev2Dialogue_NullDescription_ValidDescriptionImgSourceDecsriptionTitle_Expected_DialogueSetup_DescriptionSetToEmpty() { IDialogueViewModel dev2Dialogue = new DialogueViewModel(); string newFileName = _filePath.Replace(".png", "Dev2Dialogue_NullDescription_ValidDescriptionImgSourceDecsriptionTitle_Expected_DialogueSetup_DescriptionSetToEmpty.png"); createFile(newFileName); dev2Dialogue.SetupDialogue("Test Title", null, newFileName, "SomeTitleText"); File.Delete(newFileName); Assert.AreEqual(string.Empty, dev2Dialogue.DescriptionText); // cleanup - Dispose of the dev2Dialogue dev2Dialogue.Dispose(); }
// ReSharper disable once InconsistentNaming public void Dev2DialogueSetup_CorrectParameterSet_Test() { IDialogueViewModel dev2Dialogue = new DialogueViewModel(); string newFileName = _filePath.Replace(".png", "Dev2DialogueSetup_CorrectParameterSet_Test.png"); createFile(newFileName); dev2Dialogue.SetupDialogue("Test Title", "Test Description", newFileName, "SomeTitleText"); File.Delete(newFileName); Assert.IsTrue(dev2Dialogue.ImageSource != null); // cleanup - Dispose of the dev2Dialogue dev2Dialogue.Dispose(); }
public void Dev2Dialogue_NullTitleDescriptionDescriptionTitleText_ValidImageSource_Expected_ValidImage() { IDialogueViewModel dev2Dialogue = new DialogueViewModel(); string newFileName = _filePath.Replace(".png", "Dev2Dialogue_NullTitleDescriptionDescriptionTitleText_ValidImageSource_Expected_ValidImage.png"); createFile(newFileName); dev2Dialogue.SetupDialogue("Test Title", null, newFileName, null); File.Delete(newFileName); Assert.IsNotNull(dev2Dialogue.ImageSource); // cleanup - Dispose of the dev2Dialogue dev2Dialogue.Dispose(); }
public void Dev2Dialogue_NullDescriptionDescriptionTitleText_ValidTitleImageSource_Expected_EmptyDescriptionTitleAndDescription() { IDialogueViewModel dev2Dialogue = new DialogueViewModel(); string newFileName = _filePath.Replace(".png", "Dev2Dialogue_NullDescriptionDescriptionTitleText_ValidTitleImageSource_Expected_EmptyDescriptionTitleAndDescription.png"); createFile(newFileName); dev2Dialogue.SetupDialogue("Test Title", null, newFileName, null); File.Delete(newFileName); Assert.IsTrue(dev2Dialogue.DescriptionText == string.Empty && dev2Dialogue.DescriptionTitleText == string.Empty); // cleanup - Dispose of the dev2Dialogue dev2Dialogue.Dispose(); }
public void Dev2Dialogue_NullTitleDescription_ValidgImgSourceDecsriptionTitle_Expected_DialogueSetup_TitleandDescriptionSetToEmpty() { IDialogueViewModel dev2Dialogue = new DialogueViewModel(); string newFileName = _filePath.Replace(".png", "Dev2Dialogue_NullTitleDescription_ValidgImgSourceDecsriptionTitle_Expected_DialogueSetup_TitleandDescriptionSetToEmpty.png"); createFile(newFileName); dev2Dialogue.SetupDialogue(null, null, newFileName, "SomeTitleText"); File.Delete(newFileName); Assert.IsTrue(dev2Dialogue.Title == string.Empty && dev2Dialogue.DescriptionText == string.Empty); // cleanup - Dispose of the dev2Dialogue dev2Dialogue.Dispose(); }
public static IDialogueViewModel CreateAboutDialog() { IDialogueViewModel dialogueViewModel = new DialogueViewModel(); string packUri = StringResources.Warewolf_Logo; var ver = VersionInfo.FetchVersionInfo(); dialogueViewModel.SetupDialogue(StringResources.About_Header_Text, String.Format(StringResources.About_Content, ver, ver), packUri, StringResources.About_Description_Header, StringResources.EULA_Link, StringResources.EULA_Text); return(dialogueViewModel); }