Exemple #1
0
        public async Task <Project> ImportAsync(string fileName)
        {
            var buffer = await ReadWorkDataSourceFileAsync(fileName);

            var isTry = ProjectTextParser.TryParseProject(buffer, out var project);

            return(isTry ? project : null);
        }
Exemple #2
0
        public void TryParseProjectTests(string buffer, bool expectedIsTry, Project expectedProject)
        {
            var actualIsTry = ProjectTextParser.TryParseProject(buffer, out var actualProject);

            Assert.AreEqual(expectedIsTry, actualIsTry);
            if (expectedIsTry)
            {
                Assert.AreEqual(expectedProject.WorkCount, actualProject.WorkCount);
                CollectionAssert.AreEqual(expectedProject.TechnologicalConditions, actualProject.TechnologicalConditions);
                //CollectionAssert.AreEqual(expectedProject.TimeCharacteristics, actualProject.TimeCharacteristics);
            }
        }