Exemplo n.º 1
0
        public void InstanceBlockWorksWhenTypeRequested()
        {
            var blk = new InstanceBlock(typeof(string));

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

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

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

            blk.WithType(typeof(string));
        }