Exemple #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));
 }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #6
0
 //-------------------------------------------------------------------------
 public virtual void test_ofPay()
 {
     assertEquals(PayReceive.ofPay(true), PayReceive.PAY);
     assertEquals(PayReceive.ofPay(false), PayReceive.RECEIVE);
 }
Exemple #7
0
 public virtual void test_of_lookup_null()
 {
     assertThrowsIllegalArg(() => PayReceive.of(null));
 }
Exemple #8
0
 public virtual void test_of_lookup_notFound()
 {
     assertThrowsIllegalArg(() => PayReceive.of("Rubbish"));
 }