Example #1
0
        public void metatest()
        {
            var handler = new Handler();
            handler.AddFolder( @"C:\src\git\dsfp\templates\d" );

            var rd = new ResultDisplay( handler, new TemplateFile( @"C:\src\git\dsfp\DsTrack\DsTrack\templatedata.txt" ) );
            foreach( var r in rd.Display().Where( s => !s.Contains( "PartiallyUsed" ) ) )
            {
                var l = File.ReadAllLines( path );
                var lines = l.Select( s => new Line( s ) ).ToArray();
                Result.Lines = lines;
                realfiles();
            }
        }
Example #2
0
        public void CanReturnDisplay()
        {
            var l = new TemplateFile( new[] { "l1\t\t0h", "l2\t\t1h", "l3\t\t2h", "l4\t\t3h" } );
            var data = new uint[] { 0 };
            var data2 = new uint[] { 0xF0001324 };
            var data3 = new uint[] { 0x11001000 };
            var inputarr = new[] { new Input( data, "s1" ), new Input( data2, "s2" ), new Input( data3, "s3" ) };

            var h = new Handler( 0, 4 );
            foreach( var i in inputarr )
                h.AddInput( i );

            var rd = new ResultDisplay( h, l );
            var strings = rd.Display().ToArray();

            Assert.AreEqual( 3, strings.Length );
            Assert.AreEqual( "00000-4: s2 (l1)", strings[0] );
            Assert.AreEqual( "00000-0: s3 (l1)", strings[1] );
            Assert.AreEqual( "00002-4: s2 (l3)", strings[2] );
        }