示例#1
0
        public void Rejection_CatalogSatisfiesBatch()
        {
            var container = ContainerFactory.CreateWithAttributedCatalog(typeof(NoImportPart));
            var needy     = new Needy();

            container.ComposeParts(needy);
            Assert.IsType <SingleImpl>(needy.SingleImport);
        }
示例#2
0
        public void Rejection_CatalogSatisfiesBatch()
        {
            var container = ContainerFactory.CreateWithAttributedCatalog(typeof(NoImportPart));
            var needy     = new Needy();

            container.ComposeParts(needy);
            Assert.IsInstanceOfType(needy.SingleImport, typeof(SingleImpl), "Import not satisifed as expected");
        }
示例#3
0
        public void Rejection_BatchSatisfiesBatchReversed()
        {
            var container = ContainerFactory.Create();
            var needy     = new Needy();

            container.ComposeParts(new NoImportPart(), needy);
            Assert.IsType <SingleImpl>(needy.SingleImport);
        }
示例#4
0
        public void Rejection_BatchSatisfiesBatchReversed()
        {
            var container = ContainerFactory.Create();
            var needy     = new Needy();

            container.ComposeParts(new NoImportPart(), needy);
            Assert.IsInstanceOfType(needy.SingleImport, typeof(SingleImpl), "Import not satisifed as expected");
        }
        public static NeedyDTO GetNeedyDTO(Needy needy)
        {
            NeedyDTO needyDTO = new NeedyDTO();

            needyDTO.Entry_Date        = needy.Entry_Date;
            needyDTO.Needy_Kod         = needy.Needy_Kod;
            needyDTO.Number_Of_Persons = needy.Number_Of_Persons;
            return(needyDTO);
        }
        public Response Handle(Request message)
        {
            var needy = new Needy(message.Statues, message.Senderphone, message.Sendername, message.Squer, message.Phone,
                                  message.Pername);

            _context.Needy.Add(needy);
            _context.SaveChanges();
            return(new Response());
        }
示例#7
0
 public void Rejection_CatalogSatisfiesBatch()
 {
     var container = ContainerFactory.CreateWithAttributedCatalog(typeof(NoImportPart));
     var needy = new Needy();
     container.ComposeParts(needy);
     Assert.IsInstanceOfType(needy.SingleImport, typeof(SingleImpl), "Import not satisifed as expected");
 }
示例#8
0
 public void Rejection_BatchSatisfiesBatchReversed()
 {
     var container = ContainerFactory.Create();
     var needy = new Needy();
     container.ComposeParts(new NoImportPart(), needy);
     Assert.IsInstanceOfType(needy.SingleImport, typeof(SingleImpl), "Import not satisifed as expected");
 }