@itwin/core-backend 5.1.0-dev.12 → 5.1.0-dev.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2089,7 +2089,11 @@ describe("iModel", () => {
2089
2089
  it("Standalone iModel properties", () => {
2090
2090
  const standaloneRootSubjectName = "Standalone";
2091
2091
  const standaloneFile1 = IModelTestUtils.prepareOutputFile("IModel", "Standalone1.bim");
2092
- let standaloneDb1 = StandaloneDb.createEmpty(standaloneFile1, { rootSubject: { name: standaloneRootSubjectName } });
2092
+ const ecefLocation = new EcefLocation({ origin: [1, 2, 3], orientation: { yaw: 0, pitch: 0, roll: 0 } });
2093
+ const geographicCoordinateSystem = {
2094
+ horizontalCRS: { id: "10TM115-27" },
2095
+ };
2096
+ let standaloneDb1 = StandaloneDb.createEmpty(standaloneFile1, { rootSubject: { name: standaloneRootSubjectName }, ecefLocation, geographicCoordinateSystem });
2093
2097
  assert.isTrue(standaloneDb1.isStandaloneDb());
2094
2098
  assert.isTrue(standaloneDb1.isStandalone);
2095
2099
  assert.isFalse(standaloneDb1.isReadonly, "Expect standalone iModels to be read-write during create");
@@ -2102,6 +2106,8 @@ describe("iModel", () => {
2102
2106
  assert.equal(standaloneDb1.iTwinId, Guid.empty);
2103
2107
  assert.strictEqual("", standaloneDb1.changeset.id);
2104
2108
  assert.strictEqual(0, standaloneDb1.changeset.index);
2109
+ assert.deepEqual(standaloneDb1.ecefLocation?.origin, ecefLocation.origin, "standalone ecefLocation should be set");
2110
+ assert.strictEqual(standaloneDb1.geographicCoordinateSystem?.horizontalCRS?.id, "10TM115-27", "standalone coordinate system should be set");
2105
2111
  assert.equal(standaloneDb1.openMode, OpenMode.ReadWrite);
2106
2112
  standaloneDb1.close();
2107
2113
  assert.isFalse(standaloneDb1.isOpen);
@@ -2119,7 +2125,11 @@ describe("iModel", () => {
2119
2125
  const snapshotFile2 = IModelTestUtils.prepareOutputFile("IModel", "Snapshot2.bim");
2120
2126
  const snapshotFile3 = IModelTestUtils.prepareOutputFile("IModel", "Snapshot3.bim");
2121
2127
  const imodel = await generateTestSnapshot("test_for_snapshot.bim", "test.bim");
2122
- let snapshotDb1 = SnapshotDb.createEmpty(snapshotFile1, { rootSubject: { name: snapshotRootSubjectName }, createClassViews: true });
2128
+ const ecefLocation = new EcefLocation({ origin: [1, 2, 3], orientation: { yaw: 0, pitch: 0, roll: 0 } });
2129
+ const geographicCoordinateSystem = {
2130
+ horizontalCRS: { id: "10TM115-27" },
2131
+ };
2132
+ let snapshotDb1 = SnapshotDb.createEmpty(snapshotFile1, { rootSubject: { name: snapshotRootSubjectName }, createClassViews: true, ecefLocation, geographicCoordinateSystem });
2123
2133
  let snapshotDb2 = SnapshotDb.createFrom(snapshotDb1, snapshotFile2);
2124
2134
  let snapshotDb3 = SnapshotDb.createFrom(imodel, snapshotFile3, { createClassViews: true });
2125
2135
  assert.isTrue(snapshotDb1.isSnapshotDb());
@@ -2156,6 +2166,8 @@ describe("iModel", () => {
2156
2166
  assert.isTrue(snapshotDb1.isOpen);
2157
2167
  assert.isTrue(snapshotDb2.isOpen);
2158
2168
  assert.isTrue(snapshotDb3.isOpen);
2169
+ assert.deepEqual(snapshotDb1.ecefLocation?.origin, ecefLocation.origin, "snapshot ecefLocation should be set");
2170
+ assert.strictEqual(snapshotDb1.geographicCoordinateSystem?.horizontalCRS?.id, "10TM115-27", "snapshot coordinate system should be set");
2159
2171
  snapshotDb1.close();
2160
2172
  snapshotDb2.close();
2161
2173
  snapshotDb3.close();