Exemplo n.º 1
0
 public void Can_build_qobject()
 {
     AssertQObject(_ =>
     {
         var qObject = Qt.BuildQObject("TestQObject*");
         qObject.Should().NotBeNull();
         qObject.Dispose();
     });
 }
Exemplo n.º 2
0
 public void Invalid_type_names_return_null_when_building_qobjects()
 {
     AssertQObject(_ =>
     {
         Qt.BuildQObject("sdfsdfsfsd").Should().BeNull();
         Qt.BuildQObject("int").Should().BeNull();
         Qt.BuildQObject("TestQObject").Should().BeNull(); // No * at end.
     });
 }
Exemplo n.º 3
0
 public void GlobalSetup()
 {
     _guiApplication       = new QGuiApplication(new[] { "-platform", "offscreen" });
     _qmlApplicationEngine = new QQmlApplicationEngine();
     NetTestHelper.RunQml(
         _qmlApplicationEngine,
         @"
                 import QtQuick 2.0
                 import tests 1.0
                 Item {{
                 }}");
     _qObject = Qt.BuildQObject("TestQObject*");
 }