public void Build_should_return_an_object(DummyBuilder sut) { var res = sut.Build(); res.GetType().Should().Be <object>(); sut.HasNewInstanceBeenCalled.Should().BeTrue(); }
public void Compose_should_return_a_PostProcessComposer( DummyBuilder sut ) { var res = sut.Compose(); res.Should().BeAssignableTo <IPostprocessComposer <object> >(); }
public void With_should_call_the_action(DummyBuilder sut) { var hasBeenCalled = false; sut.WithAction(() => hasBeenCalled = true); hasBeenCalled.Should().BeTrue(); }
public void Returns_Null_For_Interface() { var myBuilder = new DummyBuilder(); Assert.IsNull(myBuilder.CreateDouble(typeof(IComparable))); }
public void Returns_Null_For_String() { var myBuilder = new DummyBuilder(); Assert.IsNull(myBuilder.CreateDouble(typeof(string))); }
public void Returns_Default_Int_For_Int() { var myBuilder = new DummyBuilder(); Assert.AreEqual <int>(default(int), (int)myBuilder.CreateDouble(typeof(int))); }