Hi I am trying to have an orderitem into my test class in order to test a trigger.
class is : `
public static testmethod void TaskTrigger_Test1()
{
Account a = new Account(`enter preformatted text here`Name = 'Test');
insert a;
Order o = new Order(name='Test1',AccountId=a.id,EffectiveDate=system.today(),status='draft');
insert o;
OrderItem oi = new OrderItem(OrderId=o.id,Quantity='decimal.valueof('1')',PricebookEntryId='test');
insert oi;
Task t = new Task(whatid=o.id,Priority = 'normal',status='open',subject='Email:xxxx');
insert t;
system.assertequals('Sent',o.status);
}
}
but I get this error. Any ideas?
Error: Compile Error: expecting a right parentheses, found '1' at line 33 column 81