Example #1
0
        public void Create_SimpleDuck()
        {
            Simple simple = new Simple
            {
                Name = "Duck"
            };

            var isDuckable = simple.IsDuck <ISimpleDuck>();

            Assert.IsTrue(isDuckable);

            var simpleDuck = simple.CreateDuck <ISimpleDuck>();

            Assert.IsNotNull(simpleDuck);
            Assert.AreEqual("Duck", simpleDuck.Name);
        }