示例#1
0
        public void TryGetWithEmptyAttribute()
        {
            AmplaModules?module;
            bool         result = AmplaModuleAttribute.TryGetModule <ModelWithEmptyModule>(out module);

            Assert.That(module, Is.EqualTo(null));
            Assert.That(result, Is.False);
        }
示例#2
0
        public void TryGetInheritedWithModule()
        {
            AmplaModules?module;
            bool         result = AmplaModuleAttribute.TryGetModule <InheritedModelWithModule>(out module);

            Assert.That(module, Is.EqualTo(AmplaModules.Production));
            Assert.That(result, Is.True);
        }
示例#3
0
        public void TryGetOverriddenModelWithModule()
        {
            AmplaModules?module;
            bool         result = AmplaModuleAttribute.TryGetModule <OverriddenModelWithModule>(out module);

            Assert.That(module, Is.EqualTo(AmplaModules.Quality));
            Assert.That(result, Is.True);
        }
示例#4
0
        public void TryGetWithConstructorModule()
        {
            AmplaModules?module;
            bool         result = AmplaModuleAttribute.TryGetModule <ModelModuleViaConstructor>(out module);

            Assert.That(module, Is.EqualTo(AmplaModules.Production));
            Assert.That(result, Is.True);
        }