зеркало из https://github.com/DeGsoft/maui-linux.git
42 строки
849 B
C#
42 строки
849 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using NUnit.Framework;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Core.UnitTests;
|
|
|
|
namespace Xamarin.Forms.Xaml.UnitTests
|
|
{
|
|
public partial class Gh5705 : Shell
|
|
{
|
|
public Gh5705() => InitializeComponent();
|
|
public Gh5705(bool useCompiledXaml)
|
|
{
|
|
//this stub will be replaced at compile time
|
|
}
|
|
|
|
[TestFixture] class Tests
|
|
{
|
|
|
|
[SetUp]
|
|
public void Setup()
|
|
{
|
|
Device.PlatformServices = new MockPlatformServices();
|
|
}
|
|
|
|
[TearDown]
|
|
public void TearDown()
|
|
{
|
|
Device.PlatformServices = null;
|
|
}
|
|
|
|
[Test]
|
|
public void SearchHandlerIneritBC([Values(false, true)]bool useCompiledXaml)
|
|
{
|
|
var vm = new object();
|
|
var shell = new Gh5705(useCompiledXaml) { BindingContext = vm };
|
|
Assert.That(shell.searchHandler.BindingContext, Is.EqualTo(vm));
|
|
}
|
|
}
|
|
}
|
|
}
|