public void the_attribute_is_not_generated_when_id_is_null()
        {
            var element = new GenericElement("fake").ID(null);

            element.ID.ShouldBe(null);

            element.ToString()
                .ShouldNotContain("id=\"");
        }
Example #2
0
        private IEnumerable<GenericElement> GetArtistSelect()
        {
            var artists = session.Query<Artist>().ToList(); // slooooow
            foreach (var artist in artists)
            {
                var e = new GenericElement("option"){Value = artist.Id.ToString()};
                e.ChildNodes.Add(new TextNode(artist.Name));

                yield return e;
            }
        }
        public void the_attribute_is_set_to_the_correct_value()
        {
            var element = new GenericElement("fake").ID("fakeid");

            element.ID.ShouldBe("fakeid");
        }