public void ShouldConvertToMediaBin() { var serviceContainer = TranslatorHelper.CreateServiceMediaBin(); var container = DataServiceTranslator.ConvertToMediaBin(serviceContainer); TranslatorHelper.AssertContainer(serviceContainer, container); }
public void ShouldConvertProjectIntoAServiceProject() { var project = TranslatorHelper.CreateProject(); var serviceProject = DataServiceTranslator.ConvertToDataServiceProject(project); TranslatorHelper.AssertProject(project, serviceProject); }
public void ShouldConvertCollectionOfTitleTemplatesIntoListOfTitleTemplates() { var serviceTitleTemplates = new ObservableCollection <TitleTemplate>(); serviceTitleTemplates.Add(TranslatorHelper.CreateServiceTitleTemplate()); serviceTitleTemplates.Add(TranslatorHelper.CreateServiceTitleTemplate()); var titleTemplates = DataServiceTranslator.ConvertToTitleTemplates(serviceTitleTemplates); TranslatorHelper.AssertTitleTemplate(serviceTitleTemplates[0], titleTemplates[0]); TranslatorHelper.AssertTitleTemplate(serviceTitleTemplates[1], titleTemplates[1]); }
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]); }