Example #1
0
        public void SpecificHashCode()
        {
            string fontName = "Consolas";

            SetFontsValues(fontName);
            var instance1 = _instance.Clone() as RunFontsCssProperty;

            _themeFontProvider.GetFontFace(ThemeFontValues.MajorAscii).Returns(fontName);
            SetThemeFontValues(ThemeFontValues.MajorAscii);

            Assert.AreEqual(
                instance1.GetHashCode(),
                _instance.GetHashCode());
        }
Example #2
0
 public void Initialize()
 {
     _themeFontProvider = Substitute.For <IThemeFontsProvider>();
     _instance          = new RunFontsCssProperty(_themeFontProvider)
     {
         Selector = "span.test"
     };
     _themeFontProvider
     .GetFontFace(Arg.Any <ThemeFontValues>())
     .Returns(x =>
              Enum.GetName(
                  typeof(ThemeFontValues),
                  x.Arg <ThemeFontValues>()));
 }