Exemplo n.º 1
0
 public virtual void test_ofSignedAmount()
 {
     assertEquals(PayReceive.ofSignedAmount(-1d), PayReceive.PAY);
     assertEquals(PayReceive.ofSignedAmount(-0d), PayReceive.PAY);
     assertEquals(PayReceive.ofSignedAmount(0d), PayReceive.RECEIVE);
     assertEquals(PayReceive.ofSignedAmount(+0d), PayReceive.RECEIVE);
     assertEquals(PayReceive.ofSignedAmount(1d), PayReceive.RECEIVE);
 }
 //-------------------------------------------------------------------------
 /// <summary>
 /// Converts pay/receive to a string.
 /// </summary>
 /// <param name="payReceive">  the value </param>
 /// <returns> the string form </returns>
 public static string payReceive(PayReceive payReceive)
 {
     return(payReceive.ToString().Substring(0, 3));
 }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(dataProvider = "name") public void test_of_lookupUpperCase(PayReceive convention, String name)
        public virtual void test_of_lookupUpperCase(PayReceive convention, string name)
        {
            assertEquals(PayReceive.of(name.ToUpper(Locale.ENGLISH)), convention);
        }
Exemplo n.º 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(dataProvider = "name") public void test_of_lookup(PayReceive convention, String name)
        public virtual void test_of_lookup(PayReceive convention, string name)
        {
            assertEquals(PayReceive.of(name), convention);
        }
Exemplo n.º 5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(dataProvider = "name") public void test_toString(PayReceive convention, String name)
        public virtual void test_toString(PayReceive convention, string name)
        {
            assertEquals(convention.ToString(), name);
        }
Exemplo n.º 6
0
 //-------------------------------------------------------------------------
 public virtual void test_ofPay()
 {
     assertEquals(PayReceive.ofPay(true), PayReceive.PAY);
     assertEquals(PayReceive.ofPay(false), PayReceive.RECEIVE);
 }
Exemplo n.º 7
0
 public virtual void test_of_lookup_null()
 {
     assertThrowsIllegalArg(() => PayReceive.of(null));
 }
Exemplo n.º 8
0
 public virtual void test_of_lookup_notFound()
 {
     assertThrowsIllegalArg(() => PayReceive.of("Rubbish"));
 }