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 #224 from ethanmoffat/release_bugfixes
Release bugfixes
- Loading branch information
Showing
48 changed files
with
587 additions
and
245 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
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,45 @@ | ||
using EOLib.Domain.Interact.Quest; | ||
using EOLib.IO.Services; | ||
using EOLib.Net; | ||
using EOLib.Net.PacketProcessing; | ||
using NUnit.Framework; | ||
|
||
namespace EOLib.IO.Test.Services | ||
{ | ||
[TestFixture] | ||
public class PacketEncoderServiceTest | ||
{ | ||
[Test] | ||
public void PacketEncoderService_Encode_127Byte_DoesNotProduceAny0ValueBytes() | ||
{ | ||
var svc = new PacketEncoderService(new NumberEncoderService(), new DataEncoderService()); | ||
|
||
var packet = new PacketBuilder(PacketFamily.Quest, PacketAction.Accept) | ||
.AddShort(0) | ||
.AddShort(0) | ||
.AddShort(111) | ||
.AddShort(127) | ||
.AddChar((byte)DialogReply.Link) | ||
.AddChar(1) | ||
.Build(); | ||
|
||
var encoded = svc.Encode(packet, 5); | ||
|
||
Assert.That(encoded, Has.All.Not.EqualTo(0)); | ||
} | ||
|
||
[Test] | ||
public void PacketEncoderService_Encode_0Byte_DoesNotProduceAny128ValueBytes() | ||
{ | ||
var svc = new PacketEncoderService(new NumberEncoderService(), new DataEncoderService()); | ||
|
||
var packet = new PacketBuilder(PacketFamily.Quest, PacketAction.Accept) | ||
.AddByte(0) | ||
.Build(); | ||
|
||
var encoded = svc.Encode(packet, 5); | ||
|
||
Assert.That(encoded, Has.All.Not.EqualTo(128)); | ||
} | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
using AutomaticTypeMapper; | ||
using EOLib.Net; | ||
using System.Collections.Generic; | ||
|
||
namespace EOLib.Domain.Notifiers | ||
{ | ||
public interface IUserInterfaceNotifier | ||
{ | ||
void NotifyPacketDialog(PacketFamily packetFamily); | ||
|
||
void NotifyMessageDialog(string title, IReadOnlyList<string> messages); | ||
} | ||
|
||
[AutoMappedType] | ||
public class NoOpUserInterfaceNotifier : IUserInterfaceNotifier | ||
{ | ||
public void NotifyPacketDialog(PacketFamily packetFamily) { } | ||
|
||
public void NotifyMessageDialog(string title, IReadOnlyList<string> messages) { } | ||
} | ||
} |
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
Oops, something went wrong.