-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from AnalyticalGraphicsInc/tileset
Add `tileset`.
- Loading branch information
Showing
13 changed files
with
1,330 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
411 changes: 411 additions & 0 deletions
411
DotNet/CesiumLanguageWriter/Generated/TilesetCesiumWriter.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
DotNet/CesiumLanguageWriterTests/TestTilesetCesiumWriter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
using System.Collections.Generic; | ||
using CesiumLanguageWriter; | ||
using CesiumLanguageWriter.Advanced; | ||
using NUnit.Framework; | ||
|
||
namespace CesiumLanguageWriterTests | ||
{ | ||
[TestFixture] | ||
public class TestTilesetCesiumWriter : TestCesiumPropertyWriter<TilesetCesiumWriter> | ||
{ | ||
[Test] | ||
public void TestShowProperty() | ||
{ | ||
const bool expectedShow = true; | ||
|
||
using (Packet) | ||
using (var tileset = Packet.OpenTilesetProperty()) | ||
using (var interval = tileset.OpenInterval()) | ||
{ | ||
interval.WriteShowProperty(expectedShow); | ||
} | ||
|
||
AssertExpectedJson(PacketCesiumWriter.TilesetPropertyName, new Dictionary<string, object> | ||
{ | ||
{ TilesetCesiumWriter.ShowPropertyName, expectedShow }, | ||
}); | ||
} | ||
|
||
[Test] | ||
public void TestUriProperty() | ||
{ | ||
const string expectedUri = "test.tileset"; | ||
|
||
using (Packet) | ||
using (var tileset = Packet.OpenTilesetProperty()) | ||
using (var interval = tileset.OpenInterval()) | ||
{ | ||
interval.WriteUriProperty(expectedUri, CesiumResourceBehavior.LinkTo); | ||
} | ||
AssertExpectedJson(PacketCesiumWriter.TilesetPropertyName, new Dictionary<string, object> | ||
{ | ||
{ TilesetCesiumWriter.UriPropertyName, expectedUri }, | ||
}); | ||
} | ||
|
||
[Test] | ||
public void TestMaximumScreenSpaceErrorProperty() | ||
{ | ||
const double expectedMaximumScreenSpaceError = 0.75; | ||
|
||
using (Packet) | ||
using (var tileset = Packet.OpenTilesetProperty()) | ||
using (var interval = tileset.OpenInterval()) | ||
{ | ||
interval.WriteMaximumScreenSpaceErrorProperty(expectedMaximumScreenSpaceError); | ||
} | ||
|
||
AssertExpectedJson(PacketCesiumWriter.TilesetPropertyName, new Dictionary<string, object> | ||
{ | ||
{ TilesetCesiumWriter.MaximumScreenSpaceErrorPropertyName, expectedMaximumScreenSpaceError }, | ||
}); | ||
} | ||
|
||
protected override CesiumPropertyWriter<TilesetCesiumWriter> CreatePropertyWriter(string propertyName) | ||
{ | ||
return new TilesetCesiumWriter(propertyName); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.