Showing 74 of 545 total issues
Method MockmobileDeviceLoginTest
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockmobileDeviceLoginTest()
{
//define all mocked objects as final
var mockController = GetMockController<mobileDeviceLoginRequest, mobileDeviceLoginResponse>();
Method MockgetTransactionDetailsTest
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockgetTransactionDetailsTest()
{
//define all mocked objects as final
var mockController = GetMockController<getTransactionDetailsRequest, getTransactionDetailsResponse>();
Method MockgetCustomerProfileTest
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockgetCustomerProfileTest()
{
//define all mocked objects as final
var mockController = GetMockController<getCustomerProfileRequest, getCustomerProfileResponse>();
Method ARBGetSubscriptionListCheckPagination
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void ARBGetSubscriptionListCheckPagination()
{
var arbGetSubscriptionListResponse = GetSubscriptionListResponse(1, 1);
Method MockgetBatchStatisticsTest
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockgetBatchStatisticsTest()
{
//define all mocked objects as final
var mockController = GetMockController<getBatchStatisticsRequest, getBatchStatisticsResponse>();
Method MockgetCustomerPaymentProfileTest
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockgetCustomerPaymentProfileTest()
{
//define all mocked objects as final
var mockController = GetMockController<getCustomerPaymentProfileRequest, getCustomerPaymentProfileResponse>();
Method MockupdateHeldTransactionTest
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockupdateHeldTransactionTest()
{
//define all mocked objects as final
var mockController = GetMockController<updateHeldTransactionRequest, updateHeldTransactionResponse>();
Method MockcreateTransactionTest
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockcreateTransactionTest()
{
//define all mocked objects as final
var mockController = GetMockController<createTransactionRequest, createTransactionResponse>();
Method MockgetCustomerShippingAddressTest
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockgetCustomerShippingAddressTest()
{
//define all mocked objects as final
var mockController = GetMockController<getCustomerShippingAddressRequest, getCustomerShippingAddressResponse>();
Method MockcreateCustomerProfileTest
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockcreateCustomerProfileTest()
{
//define all mocked objects as final
var mockController = GetMockController<createCustomerProfileRequest, createCustomerProfileResponse>();
Method MockcreateCustomerProfileFromTransactionTest
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public void MockcreateCustomerProfileFromTransactionTest()
{
//define all mocked objects as final
var mockController = GetMockController<createCustomerProfileFromTransactionRequest, createCustomerProfileResponse>();
Method Create
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static T Create<T>(string xml) //where T: object //MarshalByRefObject
{
var entity = default(T);
//make sure we have not null and not-empty string to de-serialize
if ( null != xml && 0 != xml.Trim().Length)
Method SetMockControllerExpectations
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
IApiOperation<TQ, TS> mockController,
TQ mockRequest,
TS mockResponse,
ANetApiResponse errorResponse,
List<String> results,
Method transactionResponse
has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring. Open
Open
public static void transactionResponse(transactionResponse argument)
{
if (null != argument)
{
transactionResponsePrePaidCard(argument.prePaidCard);
- 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"