Skip to content

Commit

Permalink
cleaned up AsMockExtensions
Browse files Browse the repository at this point in the history
git-svn-id: http://moq.googlecode.com/svn/trunk@612 b33fba48-7441-0410-8d5c-f397f7ceaa6c
  • Loading branch information
kzu.net committed Aug 9, 2009
1 parent b2f2cff commit 09ee59c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
19 changes: 11 additions & 8 deletions UnitTests/RecursiveMocksFixture.cs
Expand Up @@ -258,14 +258,6 @@ public void FieldAccessNotSupported()
Assert.Throws<NotSupportedException>(() => mock.Setup(m => m.BarField.Do("ping")));
}

[Fact]
public void IntermediateMethodInvocationNotSupported()
{
var mock = new Mock<Foo>();

Assert.Throws<NotSupportedException>(() => mock.Setup(m => m.GetBar().Do("ping")));
}

[Fact]
public void NonMockeableTypeThrows()
{
Expand All @@ -282,6 +274,16 @@ public void IntermediateIndexerAccessNotSupportedForNow()
Assert.Throws<NotSupportedException>(() => mock.Setup(m => m[0].Do("ping")).Returns("ack"));
}

[Fact]
public void IntermediateMethodInvocationNotSupported()
{
var mock = new Mock<Foo>();

Assert.Throws<NotSupportedException>(() => mock.Setup(m => m.GetBar().Do("ping")));
}



public class Foo : IFoo
{

Expand All @@ -308,6 +310,7 @@ public interface IBar
int Value { get; set; }
string Do(string command);
IBaz Baz { get; set; }
IBaz GetBaz(string value);
}

public interface IBaz
Expand Down
1 change: 1 addition & 0 deletions UnitTests/Regressions/IssueReportsFixture.cs
Expand Up @@ -11,6 +11,7 @@
using System.Text;
using Moq;
using System.ComponentModel;
using System.Reflection;

namespace Moq.Tests.Regressions
{
Expand Down
Binary file added moq-small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 09ee59c

Please sign in to comment.