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