示例#1
0
        public void Seed_NoOptions_NullTag()
        {
            NotePartSeeder seeder = new NotePartSeeder();

            seeder.SetSeedOptions(_seedOptions);

            IPart part = seeder.GetPart(_item, null, _factory);

            Assert.NotNull(part);

            NotePart np = part as NotePart;

            Assert.NotNull(np);

            TestHelper.AssertPartMetadata(np);
            Assert.Null(np.Tag);
            Assert.NotNull(np.Text);
        }
示例#2
0
        public void Seed_Options_Tag()
        {
            NotePartSeeder seeder = new NotePartSeeder();

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

            IPart part = seeder.GetPart(_item, null, _factory);

            Assert.NotNull(part);

            NotePart np = part as NotePart;

            Assert.NotNull(np);

            TestHelper.AssertPartMetadata(np);
            Assert.NotNull(np.Tag);
            Assert.NotNull(np.Text);
        }