상속: GladNet.Payload.PacketPayload
예제 #1
0
        public StatusMessage CreateStatusMessage(StatusChangePayload payload)
        {
            Throw<ArgumentNullException>.If.IsNull(payload)
                ?.Now(nameof(Payload));

            return new StatusMessage(payload);
        }
        public static void Test_Construction([EnumRange(typeof(NetStatus))] NetStatus status)
        {
            //arrange
            StatusChangePayload payload = new StatusChangePayload(status);

            //act
            StatusMessage message = new StatusMessage(payload);

            //assert
            Assert.AreEqual((message.Payload.Data as StatusChangePayload).Status, status);
        }