Пример #1
0
        public void ShouldConvertProjectIntoAServiceProject()
        {
            var project = TranslatorHelper.CreateProject();

            var serviceProject = DataServiceTranslator.ConvertToDataServiceProject(project);

            TranslatorHelper.AssertProject(project, serviceProject);
        }
Пример #2
0
        public void ShouldConvertCollectionOfServiceProjectsIntoAListProjects()
        {
            var serviceProject1 = TranslatorHelper.CreateServiceProject();
            var serviceProject2 = TranslatorHelper.CreateServiceProject();

            var projectsCollection = new ObservableCollection <Project> {
                serviceProject1, serviceProject2
            };

            var projects = DataServiceTranslator.ConvertToProjects(projectsCollection);

            Assert.AreEqual(projectsCollection.Count, projects.Count);

            TranslatorHelper.AssertProject(projectsCollection[0], projects[0]);
            TranslatorHelper.AssertProject(projectsCollection[1], projects[1]);
        }