Exemple #1
0
        public void Serialize_ErrorsList_ProducesWellFormedJson()
        {
            var erh  = new ErrorResourceHandler();
            var ejp  = new ErrorJsonParser();
            var json = ejp.ToString(errors);

            erh.WriteFile(json);
            Assert.Equal(GetResourceAsString(Constants.ErrorsSimpleResource), erh.ResultJson);
        }
Exemple #2
0
        public ExerciseReportTests()
        {
            testErrorResourceHandler
                            = new ErrorResourceHandler();
            testErrorWriter =
                new ErrorWriter(
                    testErrorResourceHandler,
                    new ErrorJsonParser());

            fakeReportHandler = new FakeReportFileHandler();
            reportWriter
                = new ReportWriter(fakeReportHandler,
                                   new ReportFormatter());
        }