コード例 #1
0
        public void should_throw_argumentnullexception()
        {
            var container =
                new ConventionsContainer();

            var exception =
                Catch.Exception(() => container.Get(null));

            exception.ShouldBeOfType(typeof(ArgumentNullException));
        }
コード例 #2
0
        public void should_return_conventions()
        {
            var container =
                new ConventionsContainer();

            container.Setup(c => c.Use<FakeConventions>().For<FakeService>());

            var conventions =
                container.Get(typeof(FakeService));

            conventions.ShouldBeOfType(typeof(FakeConventions));
        }