Пример #1
0
        public void RejectsTypedObjectMismatch()
        {
            Action act = () =>
            {
                Mock.Get(this.service).Verify(
                    x => x.DoSomething(It.Is(Equivalent.To <TestObject>(this.fixture.Create <TestObject>()))));
            };

            act.Should().Throw <AssertFailedException>();
        }
Пример #2
0
 public void MatchesDynamicObject()
 {
     Mock.Get(this.service).Verify(
         x => x.DoSomething(
             It.Is(
                 Equivalent.To <TestObject>(
                     new
     {
         Value = [email protected], Child = new { ChildValue = [email protected] }
     }))));
 }
Пример #3
0
 public void MatchesTypedObject()
 {
     Mock.Get(this.service).Verify(x => x.DoSomething(It.Is(Equivalent.To <TestObject>(this.from))));
 }