I have a class which has a internal method and i want to mock the internal method . But i am unable to mock it i.e. it is not calling the mocked function but calling the ori
Why would you want to mock an internal method?
If you find the need to mock an internal method, say to sidestep a dependency or an interaction, you perhaps should consider redesign of the class.
Inversion of Control and Dependency Injection are some possible design strategies that can reduce coupling and increase cohesion of your classes and eliminate the need to mock internal methods.
I don't believe there is a clear path to non-public mocking with Moq.
But, if you absolutely must, you can use TypeMock Isolator to mock just about anything.
Also, just so it doesn't get lost in the din: Thomas linked a good article on using the free MS Moles to mock non-public members.
Mocking the Unmockable: Using Microsoft Moles with Gallio