public void TestAsGeneric_CastAndGetAdapterFail()
        {
            SimpleAdaptable adaptable = new SimpleAdaptable();

            Assert.Null(adaptable.As <TestAdapters>());
            Assert.True(adaptable.AsCalled);
        }
        public void TestAsGeneric_GetAdapterIfCastFails()
        {
            SimpleAdaptable adaptable = new SimpleAdaptable();

            Assert.NotNull(adaptable.As <string>());
            Assert.True(adaptable.AsCalled);
        }
        public void TestAsGeneric_CastFirst()
        {
            SimpleAdaptable adaptable = new SimpleAdaptable();

            Assert.AreSame(adaptable.As <IAdaptable>(), adaptable);
            Assert.False(adaptable.AsCalled);
        }
        public void TestAs_CastAndGetAdapterFail()
        {
            SimpleAdaptable adaptable = new SimpleAdaptable();

            Assert.Null(adaptable.As(typeof(TestAdapters)));
            Assert.True(adaptable.AsCalled);
        }
        public void TestAs_GetAdapterIfCastFails()
        {
            SimpleAdaptable adaptable = new SimpleAdaptable();

            Assert.NotNull(adaptable.As(typeof(string)));
            Assert.True(adaptable.AsCalled);
        }
        public void TestAs_CastFirst()
        {
            SimpleAdaptable adaptable = new SimpleAdaptable();

            Assert.AreSame(adaptable.As(typeof(IAdaptable)), adaptable);
            Assert.False(adaptable.AsCalled);
        }
示例#7
0
 public void TestAsGeneric_CastAndGetAdapterFail()
 {
     SimpleAdaptable adaptable = new SimpleAdaptable();
     Assert.Null(adaptable.As<TestAdapters>());
     Assert.True(adaptable.AsCalled);
 }
示例#8
0
 public void TestAsGeneric_GetAdapterIfCastFails()
 {
     SimpleAdaptable adaptable = new SimpleAdaptable();
     Assert.NotNull(adaptable.As<string>());
     Assert.True(adaptable.AsCalled);
 }
示例#9
0
 public void TestAsGeneric_CastFirst()
 {
     SimpleAdaptable adaptable = new SimpleAdaptable();
     Assert.AreSame(adaptable.As<IAdaptable>(), adaptable);
     Assert.False(adaptable.AsCalled);
 }
示例#10
0
 public void TestAs_CastAndGetAdapterFail()
 {
     SimpleAdaptable adaptable = new SimpleAdaptable();
     Assert.Null(adaptable.As(typeof(TestAdapters)));
     Assert.True(adaptable.AsCalled);
 }
示例#11
0
 public void TestAs_GetAdapterIfCastFails()
 {
     SimpleAdaptable adaptable = new SimpleAdaptable();
     Assert.NotNull(adaptable.As(typeof(string)));
     Assert.True(adaptable.AsCalled);
 }
示例#12
0
 public void TestAs_CastFirst()
 {
     SimpleAdaptable adaptable = new SimpleAdaptable();
     Assert.AreSame(adaptable.As(typeof(IAdaptable)), adaptable);
     Assert.False(adaptable.AsCalled);
 }