public void ParentInChildsIsSet () {
			var converter = new ContainerConverter(graphics,container,container.Location);
			var result = converter.Convert();
			foreach (var element in result.ExportedItems) {
				Assert.That(element.Parent,Is.Not.Null);
			}
		}
 public void RowContainsOneItem()
 {
     var converter = new ContainerConverter(section.Location);
     var list = converter.CreateConvertedList(section.Items);
     var item = list[0] as ExportContainer;
     var text = item.ExportedItems[0];
     Assert.That(text,Is.AssignableTo(typeof(ExportText)));
 }
 public void ConverterReturnExportContainerWithTwoItems()
 {
     var converter = new ContainerConverter(new Point(30,30));
     var result = converter.ConvertToExportContainer(container);
     var list = converter.CreateConvertedList(container.Items);
     result.ExportedItems.AddRange(list);
     Assert.That(result.ExportedItems.Count,Is.EqualTo(2));
 }
Пример #4
0
		void BuildDetail(){
			CurrentSection = ReportModel.DetailSection;
			if(DataSourceContainsData()) {
				CurrentLocation = DetailStart;
				var converter = new ContainerConverter(DetailStart);
				if (IsGrouped()) {
					BuildGroupedDetails(converter,DetailStart);
				} else {
					BuildSortedDetails(converter,DetailStart);
				}
			}
		}
 public void SectionContainsOneItemThatIsRow()
 {
     var converter = new ContainerConverter(section.Location);
     var list = converter.CreateConvertedList(section.Items);
     Assert.That(list.Count,Is.EqualTo(1));
 }
Пример #6
0
		protected IExportContainer CreateSection(IReportContainer section,Point location)
		{
			var containerConverter = new ContainerConverter(graphics, section, location);
			var header = containerConverter.Convert();
			return header;
		}
 public void LocationIsAdjusted()
 {
     var converter = new ContainerConverter(new Point(30,30));
     var result = converter.ConvertToExportContainer(container);
     Assert.That(result.Location,Is.EqualTo(new Point(30,30)));
 }
 public void ConverterReturnExportContainer()
 {
     var converter = new ContainerConverter(new Point(30,30));
     var result = converter.ConvertToExportContainer(container);
     Assert.That(result,Is.InstanceOf(typeof(IExportContainer)));
 }
 public void ParentInChildsIsSet()
 {
     var converter = new ContainerConverter(container.Location);
     var convertedContainer = converter.ConvertToExportContainer(container);
     var convertedList = converter.CreateConvertedList(container.Items);
     converter.SetParent(convertedContainer,convertedList);
     convertedContainer.ExportedItems.AddRange(convertedList);
     foreach (var element in convertedContainer.ExportedItems) {
         Assert.That(element.Parent,Is.Not.Null);
     }
 }
		public void LocationIsAdjusted() {
			var location = new Point(30,30);
			var converter = new ContainerConverter(graphics,container,location);
			var result = converter.Convert();
			Assert.That(result.Location,Is.EqualTo(location));
		}
		public void ConverterReturnExportContainerwithTwoItems()
		{
			var converter = new ContainerConverter(graphics,container,new Point(30,30));
			var result = converter.Convert();
			Assert.That(result.ExportedItems.Count,Is.EqualTo(2));
		}