Skip to main content
deleted 7 characters in body
Source Link
yuri
  • 3
  • 1
  • 5
    @isTest
public class TestProductTableApplication {
        @testSetup  static void setup() {
        ProductTable__c product = new ProductTable__c (Name = 'carrot', Price__c = 10, Amount__c = 1500 );
        INSERT product;
    }
   @isTest static void deleteProductTable(){
        ProductTable__c product = new ProductTable__c(Name = 'Test');
        insert product;
        List<ProductTable__c>ProductTable__c testproduct = ProductTableCmpController.deleteProductTable(product.Id);
        Integer productsAfter = [select count() from ProductTable__c];
        System.assertEquals(1, productsAfter);
    }
}

Method does not exist or incorrect signature: void deleteProductTable(Id) from the type ProductTableCmpController

@AuraEnabled
    public static void deleteProductTable (List<Id> productIds) {
        List<ProductTable__c> productsToDelete = [SELECT Id FROM ProductTable__c WHERE Id in :productIds];
        delete productsToDelete;       
    }
    @isTest
public class TestProductTableApplication {
        @testSetup  static void setup() {
        ProductTable__c product = new ProductTable__c (Name = 'carrot', Price__c = 10, Amount__c = 1500 );
        INSERT product;
    }
   @isTest static void deleteProductTable(){
        ProductTable__c product = new ProductTable__c(Name = 'Test');
        insert product;
        List<ProductTable__c> testproduct = ProductTableCmpController.deleteProductTable(product.Id);
        Integer productsAfter = [select count() from ProductTable__c];
        System.assertEquals(1, productsAfter);
    }
}

Method does not exist or incorrect signature: void deleteProductTable(Id) from the type ProductTableCmpController

@AuraEnabled
    public static void deleteProductTable (List<Id> productIds) {
        List<ProductTable__c> productsToDelete = [SELECT Id FROM ProductTable__c WHERE Id in :productIds];
        delete productsToDelete;       
    }
    @isTest
public class TestProductTableApplication {
        @testSetup  static void setup() {
        ProductTable__c product = new ProductTable__c (Name = 'carrot', Price__c = 10, Amount__c = 1500 );
        INSERT product;
    }
   @isTest static void deleteProductTable(){
        ProductTable__c product = new ProductTable__c(Name = 'Test');
        insert product;
       ProductTable__c testproduct = ProductTableCmpController.deleteProductTable(product.Id);
        Integer productsAfter = [select count() from ProductTable__c];
        System.assertEquals(1, productsAfter);
    }
}

Method does not exist or incorrect signature: void deleteProductTable(Id) from the type ProductTableCmpController

@AuraEnabled
    public static void deleteProductTable (List<Id> productIds) {
        List<ProductTable__c> productsToDelete = [SELECT Id FROM ProductTable__c WHERE Id in :productIds];
        delete productsToDelete;       
    }
Source Link
yuri
  • 3
  • 1
  • 5

    @isTest
public class TestProductTableApplication {
        @testSetup  static void setup() {
        ProductTable__c product = new ProductTable__c (Name = 'carrot', Price__c = 10, Amount__c = 1500 );
        INSERT product;
    }
   @isTest static void deleteProductTable(){
        ProductTable__c product = new ProductTable__c(Name = 'Test');
        insert product;
        List<ProductTable__c> testproduct = ProductTableCmpController.deleteProductTable(product.Id);
        Integer productsAfter = [select count() from ProductTable__c];
        System.assertEquals(1, productsAfter);
    }
}

Method does not exist or incorrect signature: void deleteProductTable(Id) from the type ProductTableCmpController

@AuraEnabled
    public static void deleteProductTable (List<Id> productIds) {
        List<ProductTable__c> productsToDelete = [SELECT Id FROM ProductTable__c WHERE Id in :productIds];
        delete productsToDelete;       
    }