Exemple #1
0
        public void can_create_buffers_from_file_without_regions()
        {
            var file = FileGenerator.Create("Program.cs", SourceCodeProvider.ConsoleProgramNoRegion);

            var buffers = BufferGenerator.CreateBuffers(file).ToList();

            buffers.Should().NotBeNullOrEmpty();
            buffers.Count.Should().Be(1);
            buffers.Should().Contain(b => b.Id == "Program.cs");
        }
Exemple #2
0
        public void Can_create_buffer_from_fsharp_file()
        {
            var file    = FileGenerator.Create("Program.fs", SourceCodeProvider.FSharpConsoleProgramMultipleRegions);
            var buffers = BufferGenerator.CreateBuffers(file).ToList();

            buffers.Should().NotBeNullOrEmpty();
            buffers.Count.Should().Be(2);
            buffers.Should().Contain(b => b.Id == "Program.fs@alpha");
            buffers.Should().Contain(b => b.Id == "Program.fs@beta");
        }