How to use buildMessageContent method of com.consol.citrus.validation.builder.AbstractMessageContentBuilder class

Best Citrus code snippet using com.consol.citrus.validation.builder.AbstractMessageContentBuilder.buildMessageContent

Source:SendMessageTestDesignerTest.java Github

copy

Full Screen

...116 Assert.assertEquals(messageBuilder.getMessageHeaders().size(), 0L);117 Assert.assertEquals(messageBuilder.getMessage().getHeaders().size(), message.getHeaders().size());118 Assert.assertEquals(messageBuilder.getMessage().getHeader(MessageHeaders.ID), message.getHeader(MessageHeaders.ID));119 Assert.assertEquals(messageBuilder.getMessage().getHeader("operation"), "foo");120 final Message constructed = messageBuilder.buildMessageContent(new TestContext(), MessageType.PLAINTEXT.name());121 Assert.assertEquals(constructed.getHeaders().size(), message.getHeaders().size() + 1);122 Assert.assertEquals(constructed.getHeader("operation"), "foo");123 Assert.assertEquals(constructed.getHeader(MessageHeaders.MESSAGE_TYPE), MessageType.PLAINTEXT.name());124 Assert.assertNotEquals(constructed.getHeader(MessageHeaders.ID), message.getHeader(MessageHeaders.ID));125 }126 @Test127 public void testSendBuilderWithObjectMessageInstanceAdditionalHeader() {128 final Message message = new DefaultMessage(10).setHeader("operation", "foo");129 final MockTestDesigner builder = new MockTestDesigner(applicationContext, context) {130 @Override131 public void configure() {132 send(messageEndpoint)133 .message(message)134 .header("additional", "new");135 }136 };137 builder.configure();138 final TestCase test = builder.getTestCase();139 Assert.assertEquals(test.getActionCount(), 1);140 Assert.assertEquals(test.getActions().get(0).getClass(), DelegatingTestAction.class);141 Assert.assertEquals(((DelegatingTestAction)test.getActions().get(0)).getDelegate().getClass(), SendMessageAction.class);142 final SendMessageAction action = (SendMessageAction) ((DelegatingTestAction)test.getActions().get(0)).getDelegate();143 Assert.assertEquals(action.getName(), "send");144 Assert.assertEquals(action.getEndpoint(), messageEndpoint);145 Assert.assertEquals(action.getMessageBuilder().getClass(), StaticMessageContentBuilder.class);146 final StaticMessageContentBuilder messageBuilder = (StaticMessageContentBuilder) action.getMessageBuilder();147 Assert.assertEquals(messageBuilder.getMessage().getPayload(), 10);148 Assert.assertEquals(messageBuilder.getMessageHeaders().size(), 1L);149 Assert.assertEquals(messageBuilder.getMessageHeaders().get("additional"), "new");150 Assert.assertEquals(messageBuilder.getMessage().getHeaders().size(), message.getHeaders().size());151 Assert.assertEquals(messageBuilder.getMessage().getHeader(MessageHeaders.ID), message.getHeader(MessageHeaders.ID));152 Assert.assertEquals(messageBuilder.getMessage().getHeader("operation"), "foo");153 final Message constructed = messageBuilder.buildMessageContent(new TestContext(), MessageType.PLAINTEXT.name());154 Assert.assertEquals(constructed.getHeaders().size(), message.getHeaders().size() + 2);155 Assert.assertEquals(constructed.getHeader("operation"), "foo");156 Assert.assertEquals(constructed.getHeader("additional"), "new");157 Assert.assertEquals(constructed.getHeader(MessageHeaders.MESSAGE_TYPE), MessageType.PLAINTEXT.name());158 }159 @Test160 public void testSendBuilderWithPayloadModel() {161 reset(applicationContextMock);162 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());163 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<>());164 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<>());165 when(applicationContextMock.getBeansOfType(Marshaller.class)).thenReturn(Collections.singletonMap("marshaller", marshaller));166 when(applicationContextMock.getBean(Marshaller.class)).thenReturn(marshaller);167 final MockTestDesigner builder = new MockTestDesigner(applicationContextMock, context) {...

Full Screen

Full Screen

Source:AbstractMessageContentBuilder.java Github

copy

Full Screen

...55 * @param context56 * @param messageType57 * @return58 */59 public Message buildMessageContent(final TestContext context, final String messageType) {60 return buildMessageContent(context, messageType, MessageDirection.UNBOUND);61 }62 /**63 * Constructs the control message with headers and payload coming from 64 * subclass implementation.65 */66 @Override67 public Message buildMessageContent(68 final TestContext context,69 final String messageType,70 final MessageDirection direction) {71 final Object payload = buildMessagePayload(context, messageType);72 try {73 Message message = new DefaultMessage(payload, buildMessageHeaders(context, messageType));74 message.setName(messageName);75 if (payload != null) {76 for (final MessageConstructionInterceptor interceptor: context.getGlobalMessageConstructionInterceptors().getMessageConstructionInterceptors()) {77 if (direction.equals(MessageDirection.UNBOUND)78 || interceptor.getDirection().equals(MessageDirection.UNBOUND)79 || direction.equals(interceptor.getDirection())) {80 message = interceptor.interceptMessageConstruction(message, messageType, context);81 }...

Full Screen

Full Screen

Source:HttpMessageContentBuilder.java Github

copy

Full Screen

...36 this.template = httpMessage;37 this.delegate = delegate;38 }39 @Override40 public Message buildMessageContent(final TestContext context, final String messageType) {41 return buildMessageContent(context, messageType, MessageDirection.UNBOUND);42 }43 @Override44 public Message buildMessageContent(final TestContext context, final String messageType, final MessageDirection direction) {45 //Copy the initial message, so that it is not manipulated during the test.46 final HttpMessage message = new HttpMessage(template);47 delegate.getMessageHeaders().putAll(template.getHeaders());48 final Message constructed = delegate.buildMessageContent(context, messageType, direction);49 message.setName(delegate.getMessageName());50 message.setPayload(constructed.getPayload());51 message.setCookies(constructCookies(context));52 replaceHeaders(constructed, message);53 return message;54 }55 /**56 * Replaces all headers57 * @param from The message to take the headers from58 * @param to The message to set the headers to59 */60 private void replaceHeaders(final Message from, final Message to) {61 to.getHeaders().clear();62 to.getHeaders().putAll(from.getHeaders());...

Full Screen

Full Screen

buildMessageContent

Using AI Code Generation

copy

Full Screen

1import com.consol.citrus.dsl.builder.BuilderSupport;2import com.consol.citrus.dsl.builder.HttpActionBuilder;3import com.consol.citrus.dsl.builder.HttpClientActionBuilder;4import com.consol.citrus.dsl.builder.HttpServerActionBuilder;5import com.consol.citrus.dsl.runner.TestRunner;6import com.consol.citrus.dsl.runner.TestRunnerSupport;7import com.consol.citrus.dsl.testng.TestNGCitrusTestRunner;8import com.consol.citrus.http.message.HttpMessage;9import com.consol.citrus.message.MessageType;10import com.consol.citrus.testng.CitrusParameters;11import com.consol.citrus.validation.builder.AbstractMessageContentBuilder;12import com.consol.citrus.validation.builder.DefaultMessageBuilder;13import java.util.Collections;14import java.util.List;15import java.util.Map;16import java.util.function.Supplier;17import org.testng.annotations.Test;18public class buildMessageContentTest extends TestNGCitrusTestRunner {19 private final TestRunnerSupport runner = new TestRunnerSupport() {20 public TestRunner getRunner() {21 return new TestRunnerSupport();22 }23 };24 @CitrusParameters("param")25 public void buildMessageContent(String param) {26 runner.run(new HttpClientActionBuilder() {27 public void doConfigure() {28 send()29 .client("client")30 .message()31 .body(new AbstractMessageContentBuilder<HttpMessage>(runner) {32 protected HttpMessage buildMessageContent(BuilderSupport<HttpMessage> builder, Map<String, Object> headers, List<String> messagePayload) {33 return new HttpMessage();34 }35 });36 }37 });38 }39 @CitrusParameters("param")40 public void buildMessageContent2(String param) {41 runner.run(new HttpServerActionBuilder() {42 public void doConfigure() {43 receive()44 .server("server")45 .message()46 .body(new AbstractMessageContentBuilder<HttpMessage>(runner) {47 protected HttpMessage buildMessageContent(BuilderSupport<HttpMessage> builder, Map<String, Object> headers, List<String> messagePayload) {48 return new HttpMessage();49 }50 });51 }52 });53 }54 @CitrusParameters("param")

Full Screen

Full Screen

buildMessageContent

Using AI Code Generation

copy

Full Screen

1package com.consol.citrus.validation.builder;2import com.consol.citrus.message.Message;3import com.consol.citrus.message.MessageType;4import com.consol.citrus.testng.AbstractTestNGUnitTest;5import org.testng.Assert;6import org.testng.annotations.Test;7public class AbstractMessageContentBuilderTest extends AbstractTestNGUnitTest {8 public void testBuildMessageContent() {9 AbstractMessageContentBuilder messageContentBuilder = new AbstractMessageContentBuilder() {10 public Message buildMessageContent(String messageType, String messageName, String controlMessage) {11 return new Message() {12 public String getPayload() {13 return "payload";14 }15 public String getHeader(String name) {16 return null;17 }18 public void setHeader(String name, Object value) {19 }20 public void removeHeader(String name) {21 }22 public void setHeaders(java.util.Map<String, Object> headers) {23 }24 public java.util.Map<String, Object> getHeaders() {25 return null;26 }27 public String getId() {28 return null;29 }30 public void setId(String id) {31 }32 public MessageType getType() {33 return null;34 }35 };36 }37 };38 Message message = messageContentBuilder.buildMessageContent("messageType", "messageName", "controlMessage");39 Assert.assertEquals(message.getPayload(), "payload");40 }41}42package com.consol.citrus.validation.builder;43import com.consol.citrus.message.Message;44import com.consol.citrus.message.MessageType;45import com.consol.citrus.testng.AbstractTestNGUnitTest;46import org.testng.Assert;47import org.testng.annotations.Test;48public class AbstractMessageContentBuilderTest extends AbstractTestNGUnitTest {49 public void testBuildMessageContent() {50 AbstractMessageContentBuilder messageContentBuilder = new AbstractMessageContentBuilder() {51 public Message buildMessageContent(String messageType, String messageName, String controlMessage) {52 return new Message() {53 public String getPayload() {54 return "payload";55 }56 public String getHeader(String name) {57 return null;58 }

Full Screen

Full Screen

buildMessageContent

Using AI Code Generation

copy

Full Screen

1package com.consol.citrus.validation.builder;2import java.util.HashMap;3import java.util.Map;4import org.springframework.core.io.ClassPathResource;5import org.springframework.core.io.Resource;6import org.testng.annotations.Test;7import com.consol.citrus.exceptions.CitrusRuntimeException;8import com.consol.citrus.testng.AbstractTestNGUnitTest;9import com.consol.citrus.validation.context.ValidationContext;10import com.consol.citrus.validation.xml.XmlMessageValidationContext;11public class AbstractMessageContentBuilderTest extends AbstractTestNGUnitTest {12public void testBuildMessageContent() {13 Map<String, String> variables = new HashMap<String, String>();14 variables.put("test", "test");15 variables.put("test2", "test2");16 Resource resource = new ClassPathResource("test.xml", AbstractMessageContentBuilderTest.class);17 XmlMessageValidationContext validationContext = new XmlMessageValidationContext();18 validationContext.setSchemaValidation(false);19 validationContext.setXpathExpressions(variables);20 AbstractMessageContentBuilder builder = new AbstractMessageContentBuilder() {21 public String buildMessageContent(String message, ValidationContext context) throws CitrusRuntimeException {22 return null;23 }24 };25 builder.buildMessageContent(resource, validationContext);26}27}28package com.consol.citrus.validation.builder;29import java.util.HashMap;30import java.util.Map;31import org.springframework.core.io.ClassPathResource;32import org.springframework.core.io.Resource;33import org.testng.annotations.Test;34import com.consol.citrus.exceptions.CitrusRuntimeException;35import com.consol.citrus.testng.AbstractTestNGUnitTest;36import com.consol.citrus.validation.context.ValidationContext;37import com.consol.citrus.validation.xml.XmlMessageValidationContext;38public class AbstractMessageContentBuilderTest extends AbstractTestNGUnitTest {39public void testBuildMessageContent() {40 Map<String, String> variables = new HashMap<String, String>();41 variables.put("test", "test");42 variables.put("test2", "test2");43 Resource resource = new ClassPathResource("test.xml", AbstractMessageContentBuilderTest.class);44 XmlMessageValidationContext validationContext = new XmlMessageValidationContext();45 validationContext.setSchemaValidation(false);46 validationContext.setXpathExpressions(variables);

Full Screen

Full Screen

buildMessageContent

Using AI Code Generation

copy

Full Screen

1package com.consol.citrus.validation.builder;2import java.util.HashMap;3import java.util.Map;4import org.testng.annotations.Test;5import com.consol.citrus.exceptions.CitrusRuntimeException;6import com.consol.citrus.testng.AbstractTestNGUnitTest;7import static org.testng.Assert.assertEquals;8import static org.testng.Assert.fail;9public class AbstractMessageContentBuilderTest extends AbstractTestNGUnitTest {10 public void testBuildMessageContent() {11 AbstractMessageContentBuilder builder = new AbstractMessageContentBuilder() {12 public String buildMessageContent(String message, Map<String, Object> headers) {13 return null;14 }15 };16 try {17 builder.buildMessageContent(null, null);18 fail("Missing exception due to invalid message content");19 } catch (CitrusRuntimeException e) {20 assertEquals(e.getMessage(), "Unable to build message content - message content is empty");21 }22 try {23 builder.buildMessageContent(" ", null);24 fail("Missing exception due to invalid message content");25 } catch (CitrusRuntimeException e) {26 assertEquals(e.getMessage(), "Unable to build message content - message content is empty");27 }28 try {29 builder.buildMessageContent(" ", new HashMap<String, Object>());30 fail("Missing exception due to invalid message content");31 } catch (CitrusRuntimeException e) {32 assertEquals(e.getMessage(), "Unable to build message content - message content is empty");33 }34 }35}36package com.consol.citrus.validation.builder;37import java.util.HashMap;38import java.util.Map;39import org.testng.annotations.Test;40import com.consol.citrus.exceptions.CitrusRuntimeException;41import com.consol.citrus.testng.AbstractTestNGUnitTest;42import static org.testng.Assert.assertEquals;43import static org.testng.Assert.fail;44public class AbstractMessageContentBuilderTest extends AbstractTestNGUnitTest {45 public void testBuildMessageContent() {46 AbstractMessageContentBuilder builder = new AbstractMessageContentBuilder() {47 public String buildMessageContent(String message, Map<String, Object> headers) {48 return null;49 }50 };51 try {52 builder.buildMessageContent(null, null);53 fail("Missing exception due to invalid message content");54 } catch (CitrusRuntimeException e) {

Full Screen

Full Screen

buildMessageContent

Using AI Code Generation

copy

Full Screen

1package com.consol.citrus.validation.builder;2import java.util.HashMap;3import java.util.Map;4import java.util.Set;5import com.consol.citrus.context.TestContext;6import com.consol.citrus.exceptions.ValidationException;7import com.consol.citrus.validation.script.GroovyScriptMessageProcessor;8import com.consol.citrus.validation.script.ScriptMessageProcessor;9import com.consol.citrus.validation.xml.XmlMessageValidationContext;10public class BuildMessageContentTest {11public static void main(String[] args) {12TestContext context = new TestContext();13XmlMessageValidationContext validationContext = new XmlMessageValidationContext();14AbstractMessageContentBuilder builder = new AbstractMessageContentBuilder() {15protected String buildMessageContent(String messagePayload, TestContext context, XmlMessageValidationContext validationContext) throws ValidationException {16return messagePayload;17}18};19ScriptMessageProcessor scriptMessageProcessor = new GroovyScriptMessageProcessor();20scriptMessageProcessor.setScriptResourcePath("classpath:com/consol/citrus/validation/builder/buildMessageContent.groovy");21builder.setMessageProcessor(scriptMessageProcessor);22builder.setValidationContext(validationContext);23builder.setMessagePayload("<addition><num1>5</num1><num2>5</num2></addition>");24String builtMessage = builder.buildMessageContent(context);25System.out.println("Built message: " + builtMessage);26}27}28package com.consol.citrus.validation.builder;29import com.consol.citrus.context.TestContext;30import com.consol.citrus.exceptions.ValidationException;31import com.consol.citrus.validation.xml.XmlMessageValidationContext;32import groovy.lang.Binding;33public class BuildMessageContent {34public static String buildMessageContent(String messagePayload, TestContext context, XmlMessageValidationContext validationContext) throws ValidationException {35Binding binding = new Binding();36binding.setVariable("messagePayload", messagePayload);37binding.setVariable("context", context);38binding.setVariable("validationContext", validationContext);39GroovyShell groovyShell = new GroovyShell(binding);

Full Screen

Full Screen

buildMessageContent

Using AI Code Generation

copy

Full Screen

1public class BuildMessageContent extends AbstractMessageContentBuilder {2 private String message;3 public BuildMessageContent(String message) {4 this.message = message;5 }6 public String buildMessageContent(Message message, TestContext context) {7 return this.message;8 }9}10public class BuildMessageContent extends AbstractMessageContentBuilder {11 private String message;12 public BuildMessageContent(String message) {13 this.message = message;14 }15 public String buildMessageContent(Message message, TestContext context) {16 return this.message;17 }18}19public class BuildMessageContent extends AbstractMessageContentBuilder {20 private String message;21 public BuildMessageContent(String message) {22 this.message = message;23 }24 public String buildMessageContent(Message message, TestContext context) {25 return this.message;26 }27}28public class BuildMessageContent extends AbstractMessageContentBuilder {29 private String message;30 public BuildMessageContent(String message) {31 this.message = message;32 }33 public String buildMessageContent(Message message, TestContext context) {34 return this.message;35 }36}37public class BuildMessageContent extends AbstractMessageContentBuilder {38 private String message;39 public BuildMessageContent(String message) {40 this.message = message;41 }42 public String buildMessageContent(Message message, TestContext context) {43 return this.message;44 }45}46public class BuildMessageContent extends AbstractMessageContentBuilder {47 private String message;48 public BuildMessageContent(String message) {49 this.message = message;50 }51 public String buildMessageContent(Message message, TestContext context) {52 return this.message;53 }54}

Full Screen

Full Screen

buildMessageContent

Using AI Code Generation

copy

Full Screen

1public class buildMessageContent {2public static void main(String[] args) {3AbstractMessageContentBuilder abstractmessagecontentbuilder = new AbstractMessageContentBuilder();4String string = abstractmessagecontentbuilder.buildMessageContent(new Message(), null);5System.out.println(string);6}7}8 public BuildMessageContent(String message) {9 this.message = message;10 }11 public String buildMessageContent(Message message, TestContext context) {12 return this.message;13 }14}15public class BuildMessageContent extends AbstractMessageContentBuilder {16 private String message;17 public BuildMessageContent(String message) {18 this.message = message;19 }20 public String buildMessageContent(Message message, TestContext context) {21 return this.message;22 }23}24public class BuildMessageContent extends AbstractMessageContentBuilder {25 private String message;26 public BuildMessageContent(String message) {27 this.message = message;28 }29 public String buildMessageContent(Message message, TestContext context) {30 return this.message;31 }32}

Full Screen

Full Screen

buildMessageContent

Using AI Code Generation

copy

Full Screen

1public class BuildMessageContent extends AbstractMessageContentBuilder {2 private String message;3 public BuildMessageContent(String message) {4 this.message = message;5 }6 public String buildMessageContent(Message message, TestContext context) {7 return this.message;8 }9}10public class BuildMessageContent extends AbstractMessageContentBuilder {11 private String message;12 public BuildMessageContent(String message) {13 this.message = message;14 }15 public String buildMessageContent(Message message, TestContext context) {16 return this.message;17 }18}19public class BuildMessageContent extends AbstractMessageContentBuilder {20 private String message;21 public BuildMessageContent(String message) {22 this.message = message;23 }24 public String buildMessageContent(Message message, TestContext context) {25 return this.message;26 }27}28public class BuildMessageContent extends AbstractMessageContentBuilder {29 private String message;30 public BuildMessageContent(String message) {31 this.message = message;32 }33 public String buildMessageContent(Message message, TestContext context) {34 return this.message;35 }36}37public class BuildMessageContent extends AbstractMessageContentBuilder {38 private String message;39 public BuildMessageContent(String message) {40 this.message = message;41 }42 public String buildMessageContent(Message message, TestContext context) {43 return this.message;44 }45}46public class BuildMessageContent extends AbstractMessageContentBuilder {47 private String message;48 public BuildMessageContent(String message) {49 this.message = message;50 }51 public String buildMessageContent(Message message, TestContext context) {52 return this.message;53 }54}

Full Screen

Full Screen

buildMessageContent

Using AI Code Generation

copy

Full Screen

1public class buildMessageContent {2public static void main(String[] args) {3AbstractMessageContentBuilder abstractmessagecontentbuilder = new AbstractMessageContentBuilder();4String string = abstractmessagecontentbuilder.buildMessageContent(new Message(), null);5System.out.println(string);6}7}

Full Screen

Full Screen

buildMessageContent

Using AI Code Generation

copy

Full Screen

1package com.consol.citrus.validation.builder;2import java.util.HashMap;3import java.util.Map;4import org.springframework.core.io.ClassPathResource;5import org.springframework.core.io.Resource;6import org.testng.annotations.Test;7import com.consol.citrus.exceptions.CitrusRuntimeException;8import com.consol.citrus.testng.AbstractTestNGUnitTest;9import com.consol.citrus.validation.context.ValidationContext;10import com.consol.citrus.validation.xml.XmlMessageValidationContext;11public class AbstractMessageContentBuilderTest extends AbstractTestNGUnitTest {12public void testBuildMessageContent() {13 Map<String, String> variables = new HashMap<String, String>();14 variables.put("test", "test");15 variables.put("test2", "test2");16 Resource resource = new ClassPathResource("test.xml", AbstractMessageContentBuilderTest.class);17 XmlMessageValidationContext validationContext = new XmlMessageValidationContext();18 validationContext.setSchemaValidation(false);19 validationContext.setXpathExpressions(variables);20 AbstractMessageContentBuilder builder = new AbstractMessageContentBuilder() {21 public String buildMessageContent(String message, ValidationContext context) throws CitrusRuntimeException {22 return null;23 }24 };25 builder.buildMessageContent(resource, validationContext);26}27}28package com.consol.citrus.validation.builder;29import java.util.HashMap;30import java.util.Map;31import org.springframework.core.io.ClassPathResource;32import org.springframework.core.io.Resource;33import org.testng.annotations.Test;34import com.consol.citrus.exceptions.CitrusRuntimeException;35import com.consol.citrus.testng.AbstractTestNGUnitTest;36import com.consol.citrus.validation.context.ValidationContext;37import com.consol.citrus.validation.xml.XmlMessageValidationContext;38public class AbstractMessageContentBuilderTest extends AbstractTestNGUnitTest {39public void testBuildMessageContent() {40 Map<String, String> variables = new HashMap<String, String>();41 variables.put("test", "test");42 variables.put("test2", "test2");43 Resource resource = new ClassPathResource("test.xml", AbstractMessageContentBuilderTest.class);44 XmlMessageValidationContext validationContext = new XmlMessageValidationContext();45 validationContext.setSchemaValidation(false);46 validationContext.setXpathExpressions(variables);

Full Screen

Full Screen

buildMessageContent

Using AI Code Generation

copy

Full Screen

1public class buildMessageContent {2public static void main(String[] args) {3AbstractMessageContentBuilder abstractmessagecontentbuilder = new AbstractMessageContentBuilder();4String string = abstractmessagecontentbuilder.buildMessageContent(new Message(), null);5System.out.println(string);6}7}

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful