Ejemplo n.º 1
0
        public void OnPlatformExtension(string markup, string platform, int expected)
        {
            var services = new MockPlatformServices
            {
                RuntimePlatform = platform
            };

            Device.PlatformServices = services;

            var actual = (new MarkupExtensionParser()).ParseExpression(ref markup, new Internals.XamlServiceProvider(null, null)
            {
                IXamlTypeResolver   = typeResolver,
                IProvideValueTarget = new MockValueProvider("foo", new object())
                {
                    TargetProperty = GetType().GetProperty(nameof(FontSize))
                }
            });

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
 public void SetUp()
 {
     MockPlatformServices.Init();
     _logMock = DependencyService.Get <ILogManager>().GetLog();
 }
 public BaselUnitTest()
 {
     var localAutoMock = AutoMock.GetLoose();
     App.SetContainer(localAutoMock.Container);
     MockPlatformServices.Init();
 }