public void ConstantFieldMemberInvalidValues() { var message = new MessageWithConstantField(); MessagePart part = GetMessagePart(message.GetType(), "ConstantField"); part.SetValue(message, "def"); }
public void SetValue() { var message = new MessageWithNonNullableRequiredStruct(); MessagePart part = this.ParameterizedMessageTypeTest(message.GetType()); part.SetValue(message, "5"); Assert.AreEqual(5, message.OptionalInt); }
public void ConstantFieldMemberValidValues() { var message = new MessageWithConstantField(); MessagePart part = GetMessagePart(message.GetType(), "ConstantField"); Assert.AreEqual("abc", part.GetValue(message)); part.SetValue(message, "abc"); Assert.AreEqual("abc", part.GetValue(message)); }
public void Base64Member() { var message = new MessageWithBase64EncodedString(); message.LastName = "andrew"; MessagePart part = GetMessagePart(message.GetType(), "nameBytes"); Assert.AreEqual("YW5kcmV3", part.GetValue(message)); part.SetValue(message, "YXJub3R0"); Assert.AreEqual("arnott", message.LastName); }