Questions tagged [private-methods]

285 questions
0
votes
2 answers

Xposed call private method not working

I tried to call a private method inside an abstract class. I used : XposedHelpers.findAndHookMethod("com.kabouzeid.gramophone.ui.activities.tageditor.AbsTagEditorActivity", lpparam.classLoader, "getTrackNumber",String.class, new XC_MethodHook(){ …
materight
  • 527
  • 8
  • 22
0
votes
2 answers

Properly test interfaces in c# private methods

I am new to c#. I do have some experience testing javascript. I was looking at assessing this test similar to checking for a method to be called in with a spy via sinon. However, I am not truely sure what to test. As I noted I am pretty new to…
Winnemucca
  • 3,309
  • 11
  • 37
  • 66
0
votes
0 answers

Recurly PHP 2.5.* in Laravel 5.1 getting 'Call to private method' error

I'm currently in the process of developing a heavily Recurly integrated platform that Users constantly have the option of adding/editing/removing features that will immediately be reflected in their subscription pricing. The environment for this…
0
votes
0 answers

Incrementing a private field in a processing class

I'm working on this class project in which I have to develop a program that tests whether a user inputted String meets a criteria. For more understanding the source code will be posted at the bottom. Although i made the array "u[]" static, it isnt…
Jeff
  • 7
  • 1
0
votes
2 answers

Inherit common functions in C#

I want to create many Service classes that use a common set of functions. All these classes will inherit ClientBase class which is provided by Microsoft. Currently I have written those common functionalities as private methods in class. What is the…
Madhur Maurya
  • 1,016
  • 4
  • 19
  • 42
0
votes
1 answer

clarity on coding standards for private methods

Recently i have switched my company and in my new company following coding standards is a must. During my Tech lead review, i got a review comment that "We should not call private methods within private methods." So is it a generic practice followed…
Raghav
  • 552
  • 1
  • 9
  • 34
0
votes
0 answers

How to break private method call from a Method Under Test in Microsoft Fakes Unit Testing?

I tried for searching a lot regarding this but did not find any helpful information. And I'm stuck in below situation and seeking for help. Below is my method which I want to test: public void MethodToTest() { this._app = this.GetApp(out…
Amar Gadekar
  • 387
  • 4
  • 11
0
votes
1 answer

Publicize.exe exits with error "Value cannot be null. Parameter name : interfaceType

I'm trying to make private accessor class using Visual Studio 2010. Here is the return of Publicize.exe: Error occurred during processing of assembly xxx Value cannot be null. Parameter name: interfaceType I use internals and InternalVisibleTo in…
0
votes
1 answer

rails search with texticle: private method `scan' called for #

I have a rails app which I want to make searchable with tenderlove's texticle. In the console it works fine, but in my app I get an error like this: /opt/local/lib/ruby/gems/1.8/gems/texticle-1.0.3/lib/texticle.rb:65:in…
0
votes
1 answer

Illegal modifier, only final is permitted?

so i am trying to create a private static method that will print the contents of an array with data from a text file. import java.io.BufferedReader; import java.io.FileReader; import java.util.ArrayList; import java.util.List; import…
RiFF RAFF
  • 131
  • 2
  • 11
0
votes
1 answer

How to define and call a private method in prototype in JavaScript?

Assume I make a custom Object: function MyObject() { // define some properties } Now I want define a private method in the prototype: MyObject.prototype = { // by doing this I defined a public method, how can I define a private method? …
Brick Yang
  • 5,388
  • 8
  • 34
  • 45
0
votes
1 answer

Mockito - Testing method that calls private methods

I was trying to find solution but haven't found yet. I tried to test public method which has calls of the couple of private ones inside. One of the problem that private method retrieves Hibernate's Criteria by generic method that in its turn…
aime
  • 247
  • 4
  • 16
0
votes
5 answers

Private method of call from Child Object

class Parent { public Parent() { System.out.println("Parent Default.."); System.out.println("Object type : " + this.getClass().getName()); this.method(); } private void method() { …
Harshit Gupta
  • 719
  • 1
  • 9
  • 26
0
votes
2 answers

Why use this when accessing a private method?

I have a question regarding oop. It might seem really trivial. I have seen example online where they use this to access a private method. Is it really necessary? Is it language specific? Here is an example which can be done with or withour…
odbhut.shei.chhele
  • 5,834
  • 16
  • 69
  • 109
0
votes
1 answer

Avoid macro running in another Excel file

This code is associated with a .xlsm file, lets say, X. When I open X file and then open a second file Y, the macro from X runs into Y as well when "delete" or "backspace" is pressed in Y. Moreover, if I open X and Y and then close X, but Y is still…
Felipe
  • 59
  • 1
  • 1
  • 9