-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c2a69d
commit 7e75d53
Showing
18 changed files
with
307 additions
and
387 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 was deleted.
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
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
18 changes: 8 additions & 10 deletions
18
Geo.Tests/Gps/Serialization/GarminFlightplanDeSerializerTests.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 |
---|---|---|
@@ -1,25 +1,23 @@ | ||
using System.IO; | ||
using System.Linq; | ||
using Geo.Gps.Serialization; | ||
using NUnit.Framework; | ||
using Xunit; | ||
|
||
namespace Geo.Tests.Gps.Serialization; | ||
|
||
[TestFixture] | ||
public class GarminFlightplanDeSerializerTests : SerializerTestFixtureBase | ||
{ | ||
[Test] | ||
[Fact] | ||
public void CanParse() | ||
{ | ||
var fileInfo = | ||
GetReferenceFileDirectory("garmin").EnumerateFiles().First(x => x.Name == "garmin.fpl"); | ||
|
||
using (var stream = new FileStream(fileInfo.FullName, FileMode.Open)) | ||
{ | ||
var file = new GarminFlightplanDeSerializer().DeSerialize(new StreamWrapper(stream)); | ||
Assert.That(file, Is.Not.Null); | ||
Assert.That(file.Routes.Count, Is.EqualTo(1)); | ||
Assert.That(file.Routes[0].Waypoints.Count, Is.EqualTo(5)); | ||
} | ||
using var stream = new FileStream(fileInfo.FullName, FileMode.Open); | ||
var file = new GarminFlightplanDeSerializer().DeSerialize(new StreamWrapper(stream)); | ||
|
||
Assert.NotNull(file); | ||
Assert.Single(file.Routes); | ||
Assert.Equal(5, file.Routes[0].Waypoints.Count); | ||
} | ||
} |
Oops, something went wrong.