Permalink
Commits on Nov 6, 2017
  1. Update the changelog

    stakx committed Nov 6, 2017
  2. Add switch for collecting setup source file info

    stakx committed Nov 6, 2017
    Up until now, Moq has been collecting source file information for each
    setups created. This comes at a slight performance penalty. At this
    moment, there is a regression in the .NET Framework which means this
    penalty becomes gigantic.
    
    This commit turns source file information collection into an opt-in
    feature. Towards that end, a `Switches` property is added to `Mock`
    and `MockRepository` which allows users to opt in or out of certain
    features. Source file info collection is controlled via the switch
    `Switches.CollectDiagnosticFileInfoForSetups`.
Commits on Oct 10, 2017
  1. Update version in changelog

    stakx committed Oct 10, 2017
  2. Activate skipped test

    stakx committed Oct 10, 2017
Commits on Sep 30, 2017
  1. Merge branch 'develop'

    stakx committed Sep 30, 2017
  2. Remove dead code

    stakx committed Sep 26, 2017
Commits on Sep 28, 2017
  1. Merge pull request #460 from stakx/asinterface-instantiation-bug

    stakx committed Sep 28, 2017
    Let `.As<T>` mocks generate same proxy as the uncast mock
  2. Update the changelog

    stakx committed Sep 28, 2017
  3. Add failing unit tests

    stakx committed Sep 28, 2017
    This one shows that if a mock is "cast" to an interface before its
    object is queried, and the proxy is then generated via the `.As<T>`
    mock, then an proxy object is created that is different from the
    proxy object retrieved from the original, uncast mock.
Commits on Sep 25, 2017
  1. Merge branch 'develop'

    stakx committed Sep 25, 2017
  2. Comment out skipped tests

    stakx committed Sep 25, 2017
    They'll likely stay skipped for another while now, and reminders have
    been set up on the GitHub issue tracker to implement the relevant
    functionality. Until then, there seems little point in getting a warn-
    ing on every build.
Commits on Sep 24, 2017
  1. Remove unused code and `ObsoleteMockException`

    stakx committed Sep 24, 2017
    That exception type is public and has never been marked `[Obsolete]`
    but it is completely redundant and there's no way to get an instance
    of it. The potential harm done by simply removing it is probably
    minimal.
  2. Remove commented out code

    stakx committed Sep 24, 2017
Commits on Sep 23, 2017
  1. Merge pull request #455 from stakx/invisible-internals

    stakx committed Sep 23, 2017
    Make setups for inaccessible internal members fail fast by throwing an exception
  2. Update the changelog

    stakx committed Sep 23, 2017
  3. Move `Mock<T>.proxyFactory` to `Mock.ProxyFactory`

    stakx committed Sep 23, 2017
    For two reasons:
    
     1. We will need to have it available inside the `Mock` class.
    
     2. We don't need several factories, a single one is enough, so
        having it in a generic class means that more factories will get
        instantiated than necessary. This can be avoided by the move
        from `Mock<T>` to `Mock`.
Commits on Sep 21, 2017
  1. Merge pull request #450 from stakx/callbase

    stakx committed Sep 21, 2017
    Make strict mocks recognize that `.CallBase()` can set up a return value, too
  2. Update the changelog

    stakx committed Sep 21, 2017
  3. Include `MethodCallReturn.CallBase` in retval check

    stakx committed Sep 21, 2017
    The `ExecuteCall` interception strategy shouldn't just ask `Method-
    CallReturn` whether it "has a return value"; make it ask whether it
    "provides a return value" (as per the exception message text), then
    implement the required check (which now also takes `CallBase` into
    consideration) directly in `MethodCallReturn`.
    
    Also, clean up and rewrite the `MethodCallReturn` class a little bit
    to make it easier to read.