Showing 74 of 545 total issues
Method CreateProfileWithCreateTransactionRequestTest
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void CreateProfileWithCreateTransactionRequestTest()
{
LogHelper.info(Logger, "CreateProfileWithCreateTransactionRequestTest");
Method MockARBGetSubscriptionTest
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockARBGetSubscriptionTest()
{
//define all mocked objects as final
var mockController = GetMockController<ARBGetSubscriptionRequest, ARBGetSubscriptionResponse>();
Method CreateTransactionFromProfile
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void CreateTransactionFromProfile()
{
//Creates a customer profile and customer payment profile
//Then uses those profiles to create a transaction request
Method GetSubscriptionSearchCardExpiringThisMonthFixTest
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void GetSubscriptionSearchCardExpiringThisMonthFixTest()
{
var rnd = new AnetRandom(DateTime.Now.Millisecond);
var createSubscription = new ARBSubscriptionType()
Method CreateTransactionShippingAddressTest
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void CreateTransactionShippingAddressTest()
{
LogHelper.info(Logger, "CreateRefundWithCustomerProfileRequestTest");
Method CreateRefundWithCustomerProfileRequestTest
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void CreateRefundWithCustomerProfileRequestTest()
{
LogHelper.info(Logger, "CreateRefundWithCustomerProfileRequestTest");
Method TestErrorMessages_ARB_ExpiredCard
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void TestErrorMessages_ARB_ExpiredCard()
{
var rnd = new AnetRandom(DateTime.Now.Millisecond);
ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = CustomMerchantAuthenticationType;
Method TestSubscription_ExpiredCC
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void TestSubscription_ExpiredCC()
{
var rnd = new AnetRandom(DateTime.Now.Millisecond);
ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = CustomMerchantAuthenticationType;
Method GetCustomerPaymentProfileListSampleTest
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void GetCustomerPaymentProfileListSampleTest()
{
LogHelper.info(Logger, "Sample getCustomerPaymentProfileList");
Method SampleCodeCreateTransactionUsingProfile
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void SampleCodeCreateTransactionUsingProfile()
{
LogHelper.info(Logger, "Sample createTransaction using Profile");
Method TestGetSubscriptionList
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void TestGetSubscriptionList()
{
//create a transaction
var transactionRequestType = new transactionRequestType
Method CreateTransactionWithECheckCapturePriorAuth
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void CreateTransactionWithECheckCapturePriorAuth()
{
//Common code to set for all requests
ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = CustomMerchantAuthenticationType;
Method transactionDetailsType
has a Cognitive Complexity of 29 (exceeds 20 allowed). Consider refactoring. Open
Open
public static void transactionDetailsType(transactionDetailsType argument)
{
if (null != argument)
{
subscriptionPaymentType(argument.subscription);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method SampleCodeCreateTransaction
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void SampleCodeCreateTransaction()
{
LogHelper.info(Logger, "Sample createTransaction");
Method ShowProperties
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void ShowProperties(Object bean) {
if ( null == bean) { return; }
try
{
Method SampleCodeCreateTransactionPriorAuthCapture
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void SampleCodeCreateTransactionPriorAuthCapture()
{
//Common code to set for all requests
ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = CustomMerchantAuthenticationType;
Method ExecuteTestRequest
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static TS ExecuteTestRequest<TQ, TS, TT>(bool successExpected, TQ request, AuthorizeNet.Environment execEnvironment = null)
where TQ : ANetApiRequest
where TS : ANetApiResponse
where TT : ApiOperationBase<TQ, TS>
{
Method MockARBGetSubscriptionListTest
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockARBGetSubscriptionListTest()
{
//define all mocked objects as final
var mockController = GetMockController<ARBGetSubscriptionListRequest, ARBGetSubscriptionListResponse>();
Method ARBGetSubscriptionSampleTest
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void ARBGetSubscriptionSampleTest()
{
LogHelper.info(Logger, "Sample GetSubscriptionList");
Method MockcreateFingerPrintTest
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockcreateFingerPrintTest()
{
var fingerPrintSupportInformation = new fingerPrintSupportInformationType
{