Example #1
0
        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();
        }
Example #4
0
            public void Returns_Null_For_Interface()
            {
                var myBuilder = new DummyBuilder();

                Assert.IsNull(myBuilder.CreateDouble(typeof(IComparable)));
            }
Example #5
0
            public void Returns_Null_For_String()
            {
                var myBuilder = new DummyBuilder();

                Assert.IsNull(myBuilder.CreateDouble(typeof(string)));
            }
Example #6
0
            public void Returns_Default_Int_For_Int()
            {
                var myBuilder = new DummyBuilder();

                Assert.AreEqual <int>(default(int), (int)myBuilder.CreateDouble(typeof(int)));
            }