Exemplo n.º 1
0
        public void can_be_created_via_factory()
        {
            using var module = new PiTopModule(new DummyGpioController());
            module.UseCamera();
            using var camera = module.GetOrCreateCamera <FileSystemCamera>(new DirectoryInfo(Path.GetTempPath()));

            camera.Should()
            .NotBeNull();
        }
Exemplo n.º 2
0
        public void can_load_images()
        {
            using var dir    = DisposableDirectory.CreateTemp();
            using var module = new PiTopModule(new DummyGpioController());
            module.UseCamera();
            using var camera = module.GetOrCreateCamera <FileSystemCamera>(dir.Root);

            camera.FrameCount.Should()
            .Be(3);
        }
Exemplo n.º 3
0
        public void can_scan_images()
        {
            using var dir    = DisposableDirectory.CreateTemp();
            using var module = new PiTopModule(new DummyGpioController());
            module.UseCamera();
            using var camera = module.GetOrCreateCamera <FileSystemCamera>(dir.Root);

            var source1 = camera.CurrentFrameSource;

            camera.Advance();
            var source2 = camera.CurrentFrameSource;

            source2.Name.Should().NotBe(source1.Name);
        }