public async void NonExistingDeviceWithId() { IFactoryDeviceService FactoryDeviceService = new FactoryDeviceService(); int fdId = 100; var fd = await FactoryDeviceService.Get(fdId); Assert.Null(fd); }
public void NonExistingCardWithId() { IFactoryDeviceService FactoryDeviceService = new FactoryDeviceService(new LiteDb()); int factoryDeviceId = 4; var singleFactoryDevice = FactoryDeviceService.GetSingleFactoryDevice(factoryDeviceId); Assert.Null(singleFactoryDevice); }
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); }
public async void AllDevices() { IFactoryDeviceService factoryDeviceService = new FactoryDeviceService(); var fds = (await factoryDeviceService.GetAll()).ToList(); Assert.NotNull(fds); Assert.NotEmpty(fds); Assert.Equal(30, fds.Count); }
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); } }
public async void AllDevices() { using (var context = new FactoryContext(builder.Options)) { IFactoryDeviceService factoryDeviceService = new FactoryDeviceService(context); PaginationOpts paginationOpts = new PaginationOpts(); var fds = (await factoryDeviceService.GetAll(paginationOpts)).ToList(); Assert.NotNull(fds); Assert.NotEmpty(fds); Assert.Equal(50, fds.Count); } }