Ejemplo n.º 1
0
        public void ShouldCorrectlyReportCollectionEquivalency()
        {
            var s = Substitute.For <IXyz>();

            s.Do(new List <int>());
            s.Received(1).Do(XArg.EquivalentTo(new List <int>()));
        }
    public void ShouldCorrectlyReportCollectionEquivalencyError()
    {
        var s = Substitute.For <IXyz>();

        s.Do(new List <int>());
        Assert.Throws <ReceivedCallsException>(() =>
        {
            s.Received(1).Do(XArg.EquivalentTo(new List <int> {
                1, 2, 3
            }));
        });
    }