Пример #1
0
 public void UseDefaultIfFeatureIsUnspecified()
 {
     using (var device = new DerivedTestDevice())
     {
         Assert.IsFalse(device.Features.IsAvailable(TestFeature3));
         Assert.IsFalse(device.Features.IsEnabled(TestFeature3));
         Assert.IsFalse(device.Features.IsAvailableAndEnabled(TestFeature3));
     }
 }
Пример #2
0
 public void CanCheckForFeatures()
 {
     using (var device = new DerivedTestDevice())
     {
         Assert.IsTrue(device.Features.IsAvailable(TestFeature0), "Features check with method in base class.");
         Assert.IsTrue(device.Features.IsAvailable(TestFeature1), "Features check with virtual method call failed.");
         Assert.IsTrue(device.Features.IsEnabled(TestFeature1), "Features check with static method call failed.");
         Assert.IsTrue(device.Features.IsAvailable(TestFeature2), "Features check with instance method call failed.");
     }
 }