Top "Private-methods" questions

assign value of readonly variable in private method called only by constructors

C# compiler gave me the following error CS0191: A readonly field cannot be assigned to (except in a constructor or …

c# readonly private-methods
Partial Mock Private Method with PowerMock-Mockito

I am new to Mockito and PowerMock. I need to test some legacy code which has a private method I …

java junit mockito powermock private-methods
What is the best practice for naming private and static private methods in C#?

I'm trying to figure out what is the smartest way to name private methods and private static methods in C#. …

c# naming-conventions private-methods
Should I test private methods using RSpec?

Is it good practice to write tests for private methods? Consider the following simple example: class Group has_many :members …

ruby rspec private-methods
How to match 'any' parameter type while mocking private method in Jmockit

I have a problem while using jmockit for the following scenario. Did a research on the web, but couldn't locate …

jmockit private-methods partial-mocks
Testing Unexported Functions in Go

I have a file called example.go and another test file called example_test.go and they are both in …

unit-testing go private-methods
Is Ruby private method accessible in sub class?

I have code as follows: class A private def p_method puts "I'm a private method from A" end end …

ruby private-methods
objective-c private versus public methods and declaration in header or not?

What is the best practice approach to private methods in objective-c. That is a method that's only going to be …

iphone objective-c methods private-methods