public void ShouldCreateStrictInstanceOfInterfaceWithDefaultCtor() { Interaction i = new Interaction(); IMockable fooMock = i.CreateStrictMock <IMockable>(); Specify.That(fooMock).ShouldNotBeNull(); }
public void ShouldCreateStrictInstanceOfAbstractType() { Interaction i = new Interaction(); MockableBase fooBaseMock = i.CreateStrictMock <MockableBase>(); Specify.That(fooBaseMock).ShouldNotBeNull(); }
public void ShouldReturnStrictMockOfCorrectType() { Interaction i = new Interaction(); object mock = i.CreateStrictMock <StrictMockSpec>(); Specify.That(mock.GetType().FullName).ShouldEqual("NBehave.Spec.Framework.Specification.Mocks.__Proxy__StrictMockSpec"); }
public void ShouldReturnStrictMockWhenSupplyingCtorArgs() { Interaction i = new Interaction(); StrictMockSpec mock = i.CreateStrictMock <StrictMockSpec>(5, "Test"); Specify.That(mock.i).ShouldEqual(5); Specify.That(mock.s).ShouldEqual("Test"); Specify.That(mock.GetType().FullName).ShouldEqual("NBehave.Spec.Framework.Specification.Mocks.__Proxy__StrictMockSpec"); }
public void CompareOneWithTwo() { Specify.That(1).ShouldEqual(2); }
public void CompareMinValues() { Specify.That(int.MinValue).ShouldEqual(int.MinValue); }
public void CompareOnes() { Specify.That(1).ShouldEqual(1); }
public void ShouldFailWhenComparingOneWithTwo() { TestStepRun run = Runner.GetPrimaryTestStepRun(CodeReference.CreateFromMember(typeof(Int32ComparisonSpecSample).GetMethod("CompareOneWithTwo"))); Specify.That(run.Result.Outcome).ShouldEqual(TestOutcome.Failed); }
public void ShouldPassWhenComparingMinValues() { TestStepRun run = Runner.GetPrimaryTestStepRun(CodeReference.CreateFromMember(typeof(Int32ComparisonSpecSample).GetMethod("CompareMinValues"))); Specify.That(run.Result.Outcome).ShouldEqual(TestOutcome.Passed); }