Skip to content

Commit

Permalink
Fix up failing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tkael committed Aug 20, 2021
1 parent c0a7ac4 commit 5c6b78f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Tests/EddiCoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,16 @@ public void TestRingCurrentBody()
public void TestRingMappedCurrentBody()
{
string line = @"{ ""timestamp"":""2018-12-16T23:04:38Z"", ""event"":""SAAScanComplete"", ""BodyName"":""BD-01 2784 10 A Ring"", ""SystemAddress"":2282942960346, ""BodyID"":42, ""ProbesUsed"":1, ""EfficiencyTarget"":0 }";

PrivateObject privateObject = new PrivateObject(EDDI.Instance);
privateObject.Invoke("updateCurrentSystem", new object[] { "BD-01 2784" });

List<Event> events = JournalMonitor.ParseJournalEntry(line);
Assert.AreEqual(1, events.Count);
Assert.IsInstanceOfType(events[0], typeof(RingMappedEvent));
RingMappedEvent @event = (RingMappedEvent)events[0];
Assert.IsNotNull(@event);

PrivateObject privateObject = new PrivateObject(EDDI.Instance);
privateObject.Invoke("updateCurrentSystem", new object[] { "BD-01 2784" });
privateObject.Invoke("eventRingMapped", new object[] { @event });
Assert.AreEqual("BD-01 2784 10", EDDI.Instance.CurrentStellarBody?.bodyname);
}
Expand Down

0 comments on commit 5c6b78f

Please sign in to comment.