public void GetTypes()
        {
            var types = Types.All();

            Assert.IsNotNull(types);
            Assert.IsTrue(types.Count > 1);
        }
Example #2
0
        public async Task GetTypes()
        {
            var types = await Types.All();

            Assert.IsNotNull(types);
            Assert.IsTrue(types.Count > 1);
        }
Example #3
0
        public override IList<ReasonOfAdmission> GetReasonsOfAdmission()
        {
            var repository = new Types<ReasonOfAdmission>();
            var reasons = repository.All();

            Assertion.GreaterThan(reasons.Count, 0, "Nenhum motivo de admissao cadastrado.").Validate();

            return reasons;
        }
Example #4
0
        public override bool ConditionOn(
            IServiceCollection services,
            ServiceDescriptor serviceDescriptor,
            IConfiguration rootConfiguration,
            IHostEnvironment hostEnvironment)
        {
            switch (ConditionType)
            {
            case ConditionType.ALL:
                return(Types.All(services.AnyService));

            case ConditionType.ANY:
                return(Types.Any(services.AnyService));

            default: throw new IndexOutOfRangeException($"Error condition type {ConditionType} on {serviceDescriptor.ImplementationType}");
            }
        }
Example #5
0
 private void UpdateAllSelected()
 {
     _allSelected = Types.All(t => t.IsSelected);
     OnPropertyChanged("AllSelected");
 }