+ Start a Discussion

inserting a closed opportunity

hi i am trying to insert a closed opportunity in a test class,is it possible, i have given all the required conditions to make a opportunity closed, and when i insert that territory its getting inserted as open opportunity. Can anybody tell me how to make a opportunity closed logically other than UserInterface.