예제 #1
0
        public void AfterAddingAFontWithTagFontShouldReturnAsTaggedWithTheRightTag()
        {
            AssetPlugin plugin = new TestAssetPlugin();

            plugin.AddFont(new BaseFont()
            {
                Name = "Bold", FontFilename = "Bold.otf"
            });
            plugin.AddFont(new BaseFont()
            {
                Name = "H1", FontFilename = "H1.otf"
            }, new FontTag("Bold", "b"));

            plugin.GetFontByName("H1").Should().NotBeNull();
            plugin.GetFontByName("Bold").Should().NotBeNull();
            plugin.GetFontByTag("H1", "b").Should().NotBeNull();
            plugin.GetFontByTag("H1", "b").Name.Should().Be("Bold");
        }
예제 #2
0
        public void GettingANonExistingTagReturnsNull()
        {
            AssetPlugin plugin = new TestAssetPlugin();

            plugin.AddFont(new BaseFont()
            {
                Name = "H1", FontFilename = "H1.otf"
            }, new FontTag("Bold", "b"));

            plugin.GetFontByTag("H1", "c").Should().BeNull();
        }
예제 #3
0
        public void GettingANonExistingFontTagReturnsNull()
        {
            AssetPlugin plugin = new TestAssetPlugin();

            plugin.GetFontByTag("Banana", "a").Should().BeNull();
        }