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); }