public void CsvDataLoader_EmbeddedResource_NotExistingDirectory()
        {
            var       loader   = new CsvDataLoader("res://Effort.Test/Internal/NonExisting");
            Exception expected = null;

            try
            {
                loader.CreateTableDataLoaderFactory();
            }
            catch (Exception ex) { expected = ex; }

            expected.Should().BeOfType <ArgumentException>();
        }
        public void CsvDataLoader_EmbeddedResource_NotExisting()
        {
            var loader      = new CsvDataLoader("res://Effort.Test/Internal/Resources/");
            var factory     = loader.CreateTableDataLoaderFactory();
            var tableLoader = factory.CreateTableDataLoader(
                new TableDescription(
                    "DoesNotExist",
                    new[]
            {
                new ColumnDescription("Id", typeof(int)),
            }));

            var data = tableLoader.GetData().ToList();

            data.Should().HaveCount(0);
        }
        public void CsvDataLoader_EmbeddedResource()
        {
            var loader      = new CsvDataLoader("res://Effort.Test/Internal/Resources/");
            var factory     = loader.CreateTableDataLoaderFactory();
            var tableLoader = factory.CreateTableDataLoader(
                new TableDescription(
                    "Foo",
                    new[]
            {
                new ColumnDescription("Id", typeof(int)),
                new ColumnDescription("Value", typeof(string))
            }));

            var data = tableLoader.GetData().Single();

            data[0].Should().Be(1);
            data[1].Should().Be("Foo");
        }