public static Notification Init() { var data = new Notification(); data.Header = Header.Init(); data.Header.msg_type = ((sbyte) HeaderMessageEnumType.notification); data.Acknowledgement = new AcknowledgementType(); return data; }
public void TestMissingAreas_Format2() { var type = new Notification(); var ackResult = type.Check(); Assert.IsNotNull(ackResult); Assert.That(ackResult.Count, Is.GreaterThanOrEqualTo(1)); var ex = ErrorReceiptCode.MissingAreas_Format; var arg0 = "Acknowledgement"; var obj = ackResult.FirstOrDefault(p => ((p.errorcode == ex.errorcode) && (p.Value.Contains(arg0)))); EqualTo(obj, ex, arg0); }
private Notification ReturnNotification(Header header, Notification notification) { var msg_acknow = GetMsgAcknow(header); switch ( msg_acknow ) { case HeaderAsknowEnumType.none: return null; case HeaderAsknowEnumType.always: return notification; case HeaderAsknowEnumType.only_when_errors: if ( (notification.Acknowledgement.AckResult == null) || (notification.Acknowledgement.AckResult.Count < 1) ) return null; else { return notification; } } throw new ArgumentOutOfRangeException("msg_acknow", msg_acknow, "Unknown value"); }
public void TestCreate() { var doc = new Notification(); Assert.IsNull(doc.Header); Assert.IsNull(doc.Acknowledgement); }