Esempio n. 1
0
        public void ShouldCreateStrictInstanceOfAbstractType()
        {
            Interaction  i           = new Interaction();
            MockableBase fooBaseMock = i.CreateStrictMock <MockableBase>();

            Specify.That(fooBaseMock).ShouldNotBeNull();
        }
Esempio n. 2
0
        public void ShouldThrowExceptionWhenNoMatchingConstructorCanBeFoundForStrictMock()
        {
            MethodThatThrows mtt = delegate()
            {
                Interaction  i       = new Interaction();
                MockableBase fooBase = i.CreateStrictMock <MockableBase>(1, 2, 3);
            };

            Specify.ThrownBy(mtt).ShouldBeOfType(typeof(NoMatchingConstructorException));
        }