コード例 #1
0
        public void Build_should_return_an_object(DummyBuilder sut)
        {
            var res = sut.Build();

            res.GetType().Should().Be <object>();
            sut.HasNewInstanceBeenCalled.Should().BeTrue();
        }
コード例 #2
0
        public void Compose_should_return_a_PostProcessComposer(
            DummyBuilder sut
            )
        {
            var res = sut.Compose();

            res.Should().BeAssignableTo <IPostprocessComposer <object> >();
        }
コード例 #3
0
        public void With_should_call_the_action(DummyBuilder sut)
        {
            var hasBeenCalled = false;

            sut.WithAction(() => hasBeenCalled = true);

            hasBeenCalled.Should().BeTrue();
        }
コード例 #4
0
            public void Returns_Null_For_Interface()
            {
                var myBuilder = new DummyBuilder();

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

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

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