mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-21 06:45:32 -06:00
Qml tests: converted DateTimeOffsetTests
This commit is contained in:
parent
5c328a9042
commit
05b48aa31e
1 changed files with 12 additions and 30 deletions
|
|
@ -33,17 +33,11 @@ namespace Qml.Net.Tests.Qml
|
|||
Mock.SetupGet(x => x.Property).Returns(value);
|
||||
Mock.SetupSet(x => x.Property = value);
|
||||
|
||||
NetTestHelper.RunQml(qmlApplicationEngine,
|
||||
RunQmlTest(
|
||||
"test",
|
||||
@"
|
||||
import QtQuick 2.0
|
||||
import tests 1.0
|
||||
DateTimeOffsetTestsQml {
|
||||
id: test
|
||||
Component.onCompleted: function() {
|
||||
test.property = test.property
|
||||
}
|
||||
}
|
||||
");
|
||||
test.property = test.property
|
||||
");
|
||||
|
||||
Mock.VerifyGet(x => x.Property, Times.Once);
|
||||
Mock.VerifySet(x => x.Property = value, Times.Once);
|
||||
|
|
@ -58,17 +52,11 @@ namespace Qml.Net.Tests.Qml
|
|||
Mock.SetupGet(x => x.Nullable).Returns(value);
|
||||
Mock.SetupSet(x => x.Nullable = value);
|
||||
|
||||
NetTestHelper.RunQml(qmlApplicationEngine,
|
||||
RunQmlTest(
|
||||
"test",
|
||||
@"
|
||||
import QtQuick 2.0
|
||||
import tests 1.0
|
||||
DateTimeOffsetTestsQml {
|
||||
id: test
|
||||
Component.onCompleted: function() {
|
||||
var v = test.nullable
|
||||
test.nullable = v
|
||||
}
|
||||
}
|
||||
var v = test.nullable
|
||||
test.nullable = v
|
||||
");
|
||||
|
||||
Mock.VerifyGet(x => x.Nullable, Times.Once);
|
||||
|
|
@ -81,17 +69,11 @@ namespace Qml.Net.Tests.Qml
|
|||
Mock.SetupGet(x => x.Nullable).Returns((DateTimeOffset?)null);
|
||||
Mock.SetupSet(x => x.Nullable = null);
|
||||
|
||||
NetTestHelper.RunQml(qmlApplicationEngine,
|
||||
RunQmlTest(
|
||||
"test",
|
||||
@"
|
||||
import QtQuick 2.0
|
||||
import tests 1.0
|
||||
DateTimeOffsetTestsQml {
|
||||
id: test
|
||||
Component.onCompleted: function() {
|
||||
var v = test.nullable
|
||||
test.nullable = v
|
||||
}
|
||||
}
|
||||
var v = test.nullable
|
||||
test.nullable = v
|
||||
");
|
||||
|
||||
Mock.VerifyGet(x => x.Nullable, Times.Once);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue