public void ReturnSucceedForIsWrappedWithOneBodyPart() { Message mc = CreateMessageContract(); PrimitiveMessagePart part = CreatePrimitiveMessagePart(); mc.MessageParts.Add(part); TestIsWrappedValidator validator = new TestIsWrappedValidator(); ValidationResults validationResults = new ValidationResults(); validator.TestDoValidate(false, mc, "IsWrapped", validationResults); Assert.IsTrue(validationResults.IsValid); }
public void ReturnSucceedForIsWrappedWithOneBodyPart() { Message mc = CreateMessageContract(); PrimitiveMessagePart part = CreatePrimitiveMessagePart(); mc.MessageParts.Add(part); TestIsWrappedValidator validator = new TestIsWrappedValidator(); ValidationResults validationResults = new ValidationResults(); validator.TestDoValidate(false, mc, "IsWrapped", validationResults); Assert.IsTrue(validationResults.IsValid); }
public void ReturnFailureForIsWrappedWithBodyParts() { Message mc = CreateMessageContract(); PrimitiveMessagePart part = CreatePrimitiveMessagePart(); PrimitiveMessagePart part2 = CreatePrimitiveMessagePart(); part2.Name = "Part2"; mc.MessageParts.Add(part); mc.MessageParts.Add(part2); TestIsWrappedValidator validator = new TestIsWrappedValidator(); ValidationResults validationResults = new ValidationResults(); validator.TestDoValidate(false, mc, "IsWrapped", validationResults); Assert.IsFalse(validationResults.IsValid); }
public void ReturnFailureForIsWrappedWithBodyParts() { Message mc = CreateMessageContract(); PrimitiveMessagePart part = CreatePrimitiveMessagePart(); PrimitiveMessagePart part2 = CreatePrimitiveMessagePart(); part2.Name = "Part2"; mc.MessageParts.Add(part); mc.MessageParts.Add(part2); TestIsWrappedValidator validator = new TestIsWrappedValidator(); ValidationResults validationResults = new ValidationResults(); validator.TestDoValidate(false, mc, "IsWrapped", validationResults); Assert.IsFalse(validationResults.IsValid); }