コード例 #1
0
        public void Seed_WithTags_Ok()
        {
            CommentLayerFragmentSeeder seeder = new CommentLayerFragmentSeeder();

            seeder.SetSeedOptions(_seedOptions);
            seeder.Configure(new CommentLayerFragmentSeederOptions
            {
                Tags = new[]
                {
                    "alpha",
                    "beta",
                    "gamma"
                }
            });

            ITextLayerFragment fragment = seeder.GetFragment(_item, "1.1", "alpha");

            Assert.NotNull(fragment);

            CommentLayerFragment fr = fragment as CommentLayerFragment;

            Assert.NotNull(fr);

            Assert.Equal("1.1", fr.Location);
            Assert.NotNull(fr.Tag);
            Assert.NotNull(fr.Text);
        }
コード例 #2
0
        public void Seed_WithoutTags_NullTag()
        {
            CommentLayerFragmentSeeder seeder = new CommentLayerFragmentSeeder();

            seeder.SetSeedOptions(_seedOptions);

            ITextLayerFragment fragment = seeder.GetFragment(_item, "1.1", "alpha");

            Assert.NotNull(fragment);

            CommentLayerFragment fr = fragment as CommentLayerFragment;

            Assert.NotNull(fr);

            Assert.Equal("1.1", fr.Location);
            Assert.Null(fr.Tag);
            Assert.NotNull(fr.Text);
        }