The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Voting
By Guest on 21st January 2025 05:16:19 AM | Syntax: TEXT | Views: 1



New paste | Download | Show/Hide line no. | Copy text to clipboard
  1. <?xml version="1.0"?>
  2. <TestCases system="OnlineVoting">
  3.   <Function name="vote">
  4.     <TestCase id="1">
  5.       <Input type="arg">
  6.         <Var name="userId" value="valid"/>
  7.         <Var name="voteChoice" value="candidateA"/>
  8.         <Var name="voteStatus" value="notVoted"/>
  9.         <Var name="voteTime" value="withinAllowedTime"/>
  10.       </Input>
  11.       <Input type="env">
  12.         <Var name="votingPeriod" value="open"/>
  13.         <Var name="userExists" value="yes"/>
  14.         <Var name="userEligibility" value="eligible"/>
  15.         <Var name="voteCount" value="valid"/>
  16.       </Input>
  17.       <Output>
  18.         <Var name="voteStatus" value="cast"/>
  19.         <Var name="voteCount" value="updated"/>
  20.       </Output>
  21.     </TestCase>
  22.  
  23.     <TestCase id="2">
  24.       <Input type="arg">
  25.         <Var name="userId" value="invalid"/>
  26.         <Var name="voteChoice" value="candidateB"/>
  27.         <Var name="voteStatus" value="notVoted"/>
  28.         <Var name="voteTime" value="withinAllowedTime"/>
  29.       </Input>
  30.       <Input type="env">
  31.         <Var name="votingPeriod" value="open"/>
  32.         <Var name="userExists" value="no"/>
  33.         <Var name="userEligibility" value="eligible"/>
  34.         <Var name="voteCount" value="valid"/>
  35.       </Input>
  36.       <Output>
  37.         <Var name="voteStatus" value="invalidUser"/>
  38.         <Var name="voteCount" value="notUpdated"/>
  39.       </Output>
  40.     </TestCase>
  41.  
  42.     <TestCase id="3">
  43.       <Input type="arg">
  44.         <Var name="userId" value="valid"/>
  45.         <Var name="voteChoice" value="candidateA"/>
  46.         <Var name="voteStatus" value="alreadyVoted"/>
  47.         <Var name="voteTime" value="withinAllowedTime"/>
  48.       </Input>
  49.       <Input type="env">
  50.         <Var name="votingPeriod" value="open"/>
  51.         <Var name="userExists" value="yes"/>
  52.         <Var name="userEligibility" value="eligible"/>
  53.         <Var name="voteCount" value="valid"/>
  54.       </Input>
  55.       <Output>
  56.         <Var name="voteStatus" value="alreadyVoted"/>
  57.         <Var name="voteCount" value="notUpdated"/>
  58.       </Output>
  59.     </TestCase>
  60.  
  61.     <TestCase id="4">
  62.       <Input type="arg">
  63.         <Var name="userId" value="valid"/>
  64.         <Var name="voteChoice" value="candidateC"/>
  65.         <Var name="voteStatus" value="notVoted"/>
  66.         <Var name="voteTime" value="afterVotingClosed"/>
  67.       </Input>
  68.       <Input type="env">
  69.         <Var name="votingPeriod" value="closed"/>
  70.         <Var name="userExists" value="yes"/>
  71.         <Var name="userEligibility" value="eligible"/>
  72.         <Var name="voteCount" value="valid"/>
  73.       </Input>
  74.       <Output>
  75.         <Var name="voteStatus" value="votingClosed"/>
  76.         <Var name="voteCount" value="notUpdated"/>
  77.       </Output>
  78.     </TestCase>
  79.  
  80.   </Function>
  81.  
  82.   <Function name="viewResults">
  83.     <TestCase id="5">
  84.       <Input type="arg">
  85.         <Var name="userId" value="valid"/>
  86.         <Var name="accessLevel" value="admin"/>
  87.       </Input>
  88.       <Input type="env">
  89.         <Var name="votingPeriod" value="closed"/>
  90.         <Var name="voteCount" value="valid"/>
  91.       </Input>
  92.       <Output>
  93.         <Var name="results" value="displayed"/>
  94.         <Var name="winner" value="candidateA"/>
  95.       </Output>
  96.     </TestCase>
  97.   </Function>
  98.  
  99. </TestCases>



  • Recent Pastes

Upload your own Photos at PasteNet Photos


Free Packet LLC
For all your hosting needs!