public async void NonExistingDeviceWithId()
        {
            IFactoryDeviceService FactoryDeviceService = new FactoryDeviceService();
            int fdId = 100;

            var fd = await FactoryDeviceService.Get(fdId);

            Assert.Null(fd);
        }
        public async void ExistingDeviceWithId()
        {
            IFactoryDeviceService FactoryDeviceService = new FactoryDeviceService();
            int fdId = 1;

            var fd = await FactoryDeviceService.Get(fdId);

            Assert.NotNull(fd);
            Assert.Equal(fdId, fd.Id);
        }
Esempio n. 3
0
        public async void NonExistingDeviceWithId()
        {
            int fdId = 2222;

            using (var context = new FactoryContext(builder.Options)) {
                IFactoryDeviceService factoryDeviceService = new FactoryDeviceService(context);
                PaginationOpts        paginationOpts       = new PaginationOpts();
                var fd = (await factoryDeviceService.Get(fdId));
                Assert.Null(fd);
            }
        }