Example #1
0
        public void IconClassReturnsRegisteredIcons()
        {
            var iconFont = new EmbeddedMappedFont("Test.otf", "test", typeof(MockFontA));

            Assert.NotNull(iconFont._mappings);
            Assert.Equal(2, iconFont._mappings.Count());
        }
Example #2
0
        public void LocatesIconWithKey(string key, string expectedGlyph)
        {
            var iconFont = new EmbeddedMappedFont("Test.otf", "test", typeof(MockFontAMapping));

            var glyph = iconFont.GetGlyph(key);

            Assert.False(string.IsNullOrWhiteSpace(glyph));

            Assert.Equal(expectedGlyph, glyph);
        }