public void Seed_Options_Ok() { TiledTextLayerPartSeeder seeder = new TiledTextLayerPartSeeder(); seeder.SetSeedOptions(_seedOptions); seeder.Configure(new TiledTextLayerPartSeederOptions { MaxFragmentCount = 3 }); // item with text IItem item = _factory.GetItemSeeder().GetItem(1, "facet"); TiledTextPartSeeder textSeeder = new TiledTextPartSeeder(); textSeeder.SetSeedOptions(_seedOptions); item.Parts.Add(textSeeder.GetPart(_item, null, _factory)); IPart part = seeder.GetPart(item, "fr.net.fusisoft.comment", _factory); Assert.NotNull(part); TiledTextLayerPart <CommentLayerFragment> lp = part as TiledTextLayerPart <CommentLayerFragment>; Assert.NotNull(lp); Assert.NotEmpty(lp.Fragments); }
public void Seed_Options_Tag() { TiledTextPartSeeder seeder = new TiledTextPartSeeder(); seeder.SetSeedOptions(_seedOptions); IPart part = seeder.GetPart(_item, null, _factory); Assert.NotNull(part); TiledTextPart tp = part as TiledTextPart; Assert.NotNull(tp); TestHelper.AssertPartMetadata(tp); Assert.NotNull(tp.Citation); Assert.NotEmpty(tp.Rows); for (int y = 1; y <= tp.Rows.Count; y++) { Assert.Equal(y, tp.Rows[y - 1].Y); } }