<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/tl/onlinemanual/000020a" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">How to test the Create method</Title>
		<Keyword ContextSensitive="No"><Level1>Business Object Layer (BOL)</Level1>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>
                                 Infor ERP LN Development Tools
                              </Level1>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>Create method</Level1>
		</Keyword>
	</Header>
	<AimSection><Paragraph class="Default">This topic describes how you can test the public Create method of a <Link href="/baanerp/tt/glossary/glossary#100032" role="glossary">Business Object</Link>.</Paragraph>
	</AimSection>
	<GeneralSection><SectionTitle>XML schema file Request</SectionTitle>
		<Figure space-and-orientation="indented-estimated"><FigIntro>The following figure shows the XML schema file of the Request argument of the Create method of the Order (tlbct790) Business Object.</FigIntro>
			<HTML:IMG height="452" width="563" SRC="../images/nt_screen_000020aa.gif" path="/enterpriseserver/tools/tl/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_000020aa.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tl/images/nt_screen_000020aa.gif" ID="IDATVBAC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/><FigCaption>tl bct bl790bcrrq0000.xsd tlbct790-Create-Request</FigCaption>
		</Figure>
	</GeneralSection>
	<GeneralSection><SectionTitle>Enter request</SectionTitle>
		<Paragraph class="Default">Start the <GUIRef href="/baanerp/tl/bct/tlbct3250m000" role="session">BOL Test Tool - Public Layer (tlbct3250m000)</GUIRef> session and enter the Business Object and the method to be tested. Click <GUIRef href="/baanerp/tl/bct/tlbct3250m000#createrequest" role="command">Enter Request</GUIRef>. A graphical browser starts, in which you must define the request argument for the Create method.</Paragraph>
		<Figure space-and-orientation="indented-estimated"><HTML:IMG height="513" width="308" SRC="../images/nt_screen_000020ab.gif" path="/enterpriseserver/tools/tl/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_000020ab.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tl/images/nt_screen_000020ab.gif" ID="IDA2VBAC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
		<Paragraph class="Default">The folders and leaves of the browser are based on the XML schema that belongs to the BOL method's request argument.</Paragraph>
		<Figure space-and-orientation="indented-estimated"><FigIntro>Folders and leaves (attributes) for which data entry by the user is obligated are marked with a red asterisk:</FigIntro>
			<HTML:IMG height="84" width="164" SRC="../images/nt_screen_000020ac.gif" path="/enterpriseserver/tools/tl/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_000020ac.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tl/images/nt_screen_000020ac.gif" ID="IDAFWBAC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
		<Figure space-and-orientation="indented-estimated"><FigIntro>Folders (Business Object components) that repeat are identified with a special icon (Order and Line are repeating):</FigIntro>
			<HTML:IMG height="201" width="124" SRC="../images/nt_screen_000020ad.gif" path="/enterpriseserver/tools/tl/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_000020ad.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tl/images/nt_screen_000020ad.gif" ID="IDAOWBAC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
		<Paragraph class="Default">Because the public layer is set-oriented, you can create multiple orders as part of a single message. For one order, one header exists and you can enter multiple lines. You can also read that header and line is mandatory for an order, an order cannot exist without a header, and a minimum of one line. The browser starts with one object, for example, one order, and a single component, for example, one line. If multiple orders or lines are required, you must use the <GUIRef href="" role="manual">Copy</GUIRef> and <GUIRef href="" role="manual">Paste</GUIRef> buttons.</Paragraph>
		<Figure space-and-orientation="indented-estimated"><FigIntro>First, select the folder that you want to copy, click <GUIRef href="" role="manual">Copy</GUIRef>, and click <GUIRef href="" role="manual">Paste</GUIRef>. The following figure provides an example of the result:</FigIntro>
			<HTML:IMG height="107" width="150" SRC="../images/nt_screen_000020ae.gif" path="/enterpriseserver/tools/tl/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_000020ae.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tl/images/nt_screen_000020ae.gif" ID="IDAXWBAC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
		<Paragraph class="Default">Double-click an attribute, or right-click an attribute, and on the shortcut menu, click <GUIRef href="" role="manual">Instance Value</GUIRef>, to start the <GUIRef href="/baanerp/tl/bct/tlbct3210m000" role="session">Instance Value (tlbct3210m000)</GUIRef> session, in which you can enter the value for the attribute.</Paragraph>
		<Important><SectionTitle>Note</SectionTitle>
			<List><ListIntro>For attributes for which no specific data is entered, you must explicitly make the following choice for each attribute:</ListIntro>
				<ListItem>Click <GUIRef href="" role="manual">Delete</GUIRef> to remove the attribute. Deleting an attribute is interpreted as the client application not having a value for this specific attribute. In technical terms, the public layer does not call a setter from the protected layer. The DAL is free to update this field with the default ERP value.</ListItem>
				<ListItem>Keep the attribute. The client or the tester has the choice to fill the attribute with a blank or zero value. In technical terms, the public layer calls a setter from the protected layer, and passes the value as blank. The DAL cannot update this attribute with a value.</ListItem>
			</List>
		</Important>
		<List><ListIntro>The <GUIRef href="" role="manual">Specific</GUIRef> menu on the Menu Browser contains the following commands:</ListIntro>
			<ListItem>Check Consistency: This option provides a warning for each <Emphasis>Mandatory</Emphasis> attribute for which no value is entered. For example, if the mandatory material attribute is not filled, the "Mandatory node material not filled" message appears.</ListItem>
			<ListItem>Create Request Argument: If you click this command, the user's data entry is approved and actualized. Changes that are not activated are lost.</ListItem>
			<ListItem>Clear Value: All data that is entered and activated, as described in the <GUIRef href="" role="manual">Create Request Argument</GUIRef> option, is cleared.</ListItem>
			<ListItem>Undo Changes: All data entry and modifications that the user makes but that are not yet activated are rolled back. To roll back the activated changes, click the <GUIRef href="" role="manual">Clear Value</GUIRef> command.</ListItem>
		</List>
		<Paragraph class="Default">Tip: to print the test data you enter, click <GUIRef href="" role="manual">Print</GUIRef> in the Menu Browser.</Paragraph>
		<Paragraph class="Default">Save the Request argument and close the graphical browser to return to the <GUIRef href="/baanerp/tl/bct/tlbct3250m000" role="session">BOL Test Tool - Public Layer (tlbct3250m000)</GUIRef> session.</Paragraph>
	</GeneralSection>
	<GeneralSection ID="executetest"><SectionTitle>Execute test</SectionTitle>
		<Paragraph class="Default">When the Request argument is created, you can run the test. Click <GUIRef href="/baanerp/tl/bct/tlbct3250m000#testdll" role="command">Execute Test</GUIRef>.</Paragraph>
		<Paragraph class="Default">The public layer is now called for the selected BOL method. The Request argument is sent as input to the method's interface.</Paragraph>
		<Paragraph class="Default">Note that before you carry out the test, you can place the public layer and protected layer <Link href="/baanerp/tt/glossary/glossary#dll.tt" role="glossary">DLLs</Link> in debugger. You can do this, for example, in case you want to apply white box testing to check the internal details of the execution.</Paragraph>
		<Paragraph class="Default">If the method finishes successfully, the <GUIRef href="" role="manual">Response</GUIRef> Graphical Browser appears automatically.</Paragraph>
		<Paragraph class="Default">If the method fails, the <GUIRef href="" role="manual">Result</GUIRef> Graphical Browser appears automatically.</Paragraph>
	</GeneralSection>
	<GeneralSection><SectionTitle>View response</SectionTitle>
		<Paragraph class="Default">If the execution is successful, that implies that no data errors are found, and a new object is created.</Paragraph>
		<Figure space-and-orientation="indented-estimated"><FigIntro>For example:</FigIntro>
			<HTML:IMG height="604" width="399" SRC="../images/nt_screen_000020af.gif" path="/enterpriseserver/tools/tl/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_000020af.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tl/images/nt_screen_000020af.gif" ID="IDAAXBAC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
	</GeneralSection>
	<GeneralSection><SectionTitle>View result</SectionTitle>
		<Figure space-and-orientation="indented-estimated"><FigIntro>A possible error is an application logic error from the DAL:</FigIntro>
			<HTML:IMG height="341" width="492" SRC="../images/nt_screen_000020ag.gif" path="/enterpriseserver/tools/tl/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_000020ag.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tl/images/nt_screen_000020ag.gif" ID="IDAJXBAC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
	</GeneralSection>
	<RelatedTopics><SectionTitle>Related topics</SectionTitle>
		<RelTopic><Link href="/baanerp/tl/onlinemanual/000020" role="manual">How to test public methods for Infor ERP LN</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tl/onlinemanual/000010" role="manual">How to test protected methods for Infor ERP LN</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/onlinemanual/100107" role="manual">To Model a Business Object</Link>
		</RelTopic>
	</RelatedTopics>
</ManualTopic>
