Beispiel #1
0
        public void InstanceBlockWorksWhenTypeRequested()
        {
            var blk = new InstanceBlock(typeof(string));

            blk.WithType();
            Check.That(blk.GetMessage()).IsEqualTo("an instance of type: [string]");
        }
Beispiel #2
0
        public void InstanceBlockShouldThrowOnForceType()
        {
            Check.ThatCode(() =>
            {
                var blk = new InstanceBlock(typeof(string));

                blk.WithType(typeof(string));
            })
            .Throws <NotSupportedException>();
        }
Beispiel #3
0
        public void InstanceBlockShouldThrowOnForceType()
        {
            Check.ThatCode(() =>
            {
                var blk = new InstanceBlock(typeof(string));

                blk.WithType(typeof(string));
            })
            .Throws<NotSupportedException>();
        }
Beispiel #4
0
        public void InstanceBlockShouldThrowOnForceType()
        {
            var blk = new InstanceBlock(typeof(string));

            blk.WithType(typeof(string));
        }