These are chat archives for akkadotnet/akka.net

17th
Jun 2017
Bartosz Sypytkowski
@Horusiath
Jun 17 2017 06:07
@chipdice do you have some problems?
Gregorius Soedharmo
@Arkatufus
Jun 17 2017 13:20
I'm having problems with xunit, wonder if anyone have this problem before
the test unit complains that it could not load xunit.assert 2.1.0, but when I downgraded xunit to 2.1.0, it complains that it could not find xunit.assert 2.2.0 with an inner exception that it could not find xunit.assert 2.1.0
i feel like i'm being trolled :P
Gregorius Soedharmo
@Arkatufus
Jun 17 2017 14:04
the source is Akka.TestKit.Xunit
Marc Piechura
@marcpiechura
Jun 17 2017 14:09
BTW you only need akka teskit if you're testing actors or streams, but for normal tests it's better to use default xunit since akka teskit creates a new actor system for every test
Gregorius Soedharmo
@Arkatufus
Jun 17 2017 14:12
I'll try removing it first then
Gregorius Soedharmo
@Arkatufus
Jun 17 2017 14:21
well, I need it because I need sourceProbe
Gregorius Soedharmo
@Arkatufus
Jun 17 2017 14:32
        [Fact]
        public void CsvParsing_should_emit_completion_even_without_new_line_at_end()
        {
            var t = this.SourceProbe<ByteString>()
                .Via(CsvParsing.LineScanner())
                .Select(list =>
                {
                    var outList = new List<string>();
                    foreach (var bs in list)
                    {
                        outList.Add(bs.DecodeString(Encoding.UTF8));
                    }
                    return outList.ToArray();
                })
                .ToMaterialized(this.SinkProbe<string[]>(), Keep.Both)
                .Run(_materializer);
            var source = t.Item1;
            var sink = t.Item2;

            source.SendNext(ByteString.FromString("eins,zwei,drei\nuno,dos,tres\n1,2,3"));
            sink.Request(3);
            sink.ExpectNext().ShouldAllBeEquivalentTo(new[] {"eins", "zwei", "drei"});
            sink.ExpectNext().ShouldAllBeEquivalentTo(new[] {"uno", "dos", "tres"});
            sink.ExpectNoMsg(TimeSpan.FromMilliseconds(100));
            source.SendComplete();
            sink.ExpectNext().ShouldAllBeEquivalentTo(new[] { "1", "2", "3" });
            sink.ExpectComplete();
        }
I think the code's correct? Is that how I supposed to set it up?
Marc Piechura
@marcpiechura
Jun 17 2017 14:33
But if I remember correctly you can remove it from CsvParserSpecs because it only tests the implementation without using streams
Looks correct, but isn't ; the default separator in csv ?
Gregorius Soedharmo
@Arkatufus
Jun 17 2017 14:37
no, its called comma separated value file...
Marc Piechura
@marcpiechura
Jun 17 2017 14:38
I see, excel always proposes ; as default ;-)
Gregorius Soedharmo
@Arkatufus
Jun 17 2017 14:39
yeah, they do that to reduce the need to quote everything because semi colon appears less commonly compared to comma
so i guess its version conflict on some of the dlls. le sigh
Marc Piechura
@marcpiechura
Jun 17 2017 14:40
Seems so
Gregorius Soedharmo
@Arkatufus
Jun 17 2017 14:42
I guess I'll skip this test case for now, I'll figure it out later