public void Init() { m_OutputMessages = new List <string>(); m_container = new UnityContainer(); UnityContainerStartUp.RegisterTypes(m_container); m_Writer.Setup(c => c.WriteLine(It.IsAny <string>())).Callback((string s) => m_OutputMessages.Add(s)); m_IfDirCreate = Directory.Exists(SurveyConst.DirectoryName); m_profile1Mock.Setup(a => a.Items).Returns(new List <ProfileItem>() { new ProfileItem(new QuestionString("ФИО", "Введите ФИО", 0, 300), "Рэй Бредбери"), new ProfileItem(new QuestionDate("Дата рождения", "Введите дату рождения в формате ДД.ММ.ГГГГ" , DateTime.Now.AddYears(-SurveyConst.MaximumLifeSpan), DateTime.Now), "10.10.1975"), new ProfileItem(new QuestionValuesList("Любимый язык программирования" , "Укажите любимый язык программирования (PHP, JavaScript, C, C++, Java, C#, Python, Ruby)" , new List <string> { "PHP", "JavaScript", "C", "C++", "Java", "C#", "Python", "Ruby" }), "C") }); m_profile1Mock.Setup(a => a.ProfileId).Returns("123-123-123456-1"); pathToProfile1Mock = Path.Combine(SurveyConst.DirectoryName, $"{m_profile1Mock.Object.ProfileId}.txt"); }
public void Init() { m_OutputMessages = new List <string>(); m_container = new UnityContainer(); UnityContainerStartUp.RegisterTypes(m_container); m_Writer.Setup(c => c.WriteLine(It.IsAny <string>())).Callback((string s) => m_OutputMessages.Add(s)); m_IfDirCreate = Directory.Exists(SurveyConst.DirectoryName); }
public void Init() { m_OutputMessages = new List <string>(); m_container = new UnityContainer(); UnityContainerStartUp.RegisterTypes(m_container); m_Writer.Setup(c => c.WriteLine(It.IsAny <string>())).Callback((string s) => m_OutputMessages.Add(s)); m_IfDirCreate = Directory.Exists(SurveyConst.DirectoryName); m_profile1Mock.Setup(a => a.Items).Returns(new List <ProfileItem>() { new ProfileItem(new QuestionString("ФИО", "Введите ФИО", 0, 300), "Рэй Бредбери"), }); m_profile1Mock.Setup(a => a.ProfileId).Returns("123-123-123456-1"); m_profile2Mock.Setup(a => a.Items).Returns(new List <ProfileItem>() { new ProfileItem(new QuestionString("ФИО", "Введите ФИО", 0, 300), "Айзек Азимов"), new ProfileItem(new QuestionDate("Дата рождения", "Введите дату рождения в формате ДД.ММ.ГГГГ" , DateTime.Now.AddYears(-SurveyConst.MaximumLifeSpan), DateTime.Now), "10.10.1922"), }); m_profile2Mock.Setup(a => a.ProfileId).Returns("123-123-123456-2"); m_profile3Mock.Setup(a => a.Items).Returns(new List <ProfileItem>() { new ProfileItem(new QuestionString("ФИО", "Введите ФИО", 0, 300), "Буджолд МакМастер"), new ProfileItem(new QuestionDate("Дата рождения", "Введите дату рождения в формате ДД.ММ.ГГГГ" , DateTime.Now.AddYears(-SurveyConst.MaximumLifeSpan), DateTime.Now), "22.11.1989"), }); m_profile3Mock.Setup(a => a.ProfileId).Returns("123-123-123456-3"); pathToProfile1Mock = Path.Combine(SurveyConst.DirectoryName, $"{m_profile1Mock.Object.ProfileId}.txt"); pathToProfile2Mock = Path.Combine(SurveyConst.DirectoryName, $"{m_profile2Mock.Object.ProfileId}.txt"); pathToProfile3Mock = Path.Combine(SurveyConst.DirectoryName, $"{m_profile3Mock.Object.ProfileId}.txt"); }
public void Init() { m_container = new UnityContainer(); UnityContainerStartUp.RegisterTypes(m_container); m_profile1Mock.Setup(a => a.Items).Returns(new List <ProfileItem>() { new ProfileItem(new QuestionString("ФИО", "Введите ФИО", 0, 300), "Рэй Бредбери"), }); m_profile1Mock.Setup(a => a.ProfileId).Returns("123-123-123456-1"); m_IfDirCreate = Directory.Exists(SurveyConst.DirectoryName); if (!Directory.Exists(TestArchiveDirectoryName)) { Directory.CreateDirectory(TestArchiveDirectoryName); } m_fullPathToDir = Path.GetFullPath(TestArchiveDirectoryName); m_fullPathToArchive = Path.Combine(m_fullPathToDir, "testArchive.zip"); pathToProfile1Mock = Path.Combine(SurveyConst.DirectoryName, $"{m_profile1Mock.Object.ProfileId}.txt"); }
public void Init() { m_container = new UnityContainer(); UnityContainerStartUp.RegisterTypes(m_container); m_IfDirCreate = Directory.Exists(SurveyConst.DirectoryName); m_profileEmptyMock.Setup(a => a.Items).Returns(new List <ProfileItem>() { new ProfileItem(new QuestionString("ФИО", "Введите ФИО", 0, 300)), }); m_profileEmptyMock.Setup(a => a.ProfileId).Returns("123-123-123456-1"); m_profilePartiallyCompletedMock.Setup(a => a.Items).Returns(new List <ProfileItem>() { new ProfileItem(new QuestionString("ФИО", "Введите ФИО", 0, 300), "Айзек Азимов"), new ProfileItem(new QuestionDate("Дата рождения", "Введите дату рождения в формате ДД.ММ.ГГГГ" , DateTime.Now.AddYears(-SurveyConst.MaximumLifeSpan), DateTime.Now)), }); m_profilePartiallyCompletedMock.Setup(a => a.ProfileId).Returns("123-123-123456-2"); m_profileFullyCompletedMock.Setup(a => a.Items).Returns(new List <ProfileItem>() { new ProfileItem(new QuestionString("ФИО", "Введите ФИО", 0, 300), "Айзек Азимов"), new ProfileItem(new QuestionDate("Дата рождения", "Введите дату рождения в формате ДД.ММ.ГГГГ" , DateTime.Now.AddYears(-SurveyConst.MaximumLifeSpan), DateTime.Now), "22.11.1989"), }); m_profileFullyCompletedMock.Setup(a => a.ProfileId).Returns("123-123-123456-4"); m_pathToProfileEmptyMock = Path.Combine(SurveyConst.DirectoryName, $"{m_profileEmptyMock.Object.ProfileId}.txt"); m_pathToProfilePartiallyCompletedMock = Path.Combine(SurveyConst.DirectoryName, $"{m_profilePartiallyCompletedMock.Object.ProfileId}.txt"); m_pathToProfileFullyCompletedMock = Path.Combine(SurveyConst.DirectoryName, $"{m_profileFullyCompletedMock.Object.ProfileId}.txt"); }
public void Init() { m_container = new UnityContainer(); UnityContainerStartUp.RegisterTypes(m_container); }
public void Init() { m_container = new UnityContainer(); UnityContainerStartUp.RegisterTypes(m_container); m_Writer.Setup(c => c.WriteLine(It.IsAny <string>())).Callback((string s) => m_OutputMessages.Add(s)); }