An implementation of IResultLogWriter which merely stores its results in a list.
Inheritance: IResultLogWriter
        public void ResultLogObjectWriter_RequiresNonNullIssue()
        {
            var uut = new ResultLogObjectWriter();

            uut.WriteToolAndRunInfo(s_defaultToolInfo, s_defaultRunInfo);
            uut.WriteResult(null);
        }
Exemplo n.º 2
0
        public void ResultLogObjectWriter_RequiresNonNullResult()
        {
            var uut = new ResultLogObjectWriter();

            uut.WriteTool(s_defaultTool);
            uut.WriteResult(null);
        }
Exemplo n.º 3
0
        public void ResultLogObjectWriter_ToolMayNotBeWrittenMoreThanOnce()
        {
            var uut = new ResultLogObjectWriter();

            uut.WriteTool(s_defaultTool);
            uut.WriteTool(s_defaultTool);
        }
Exemplo n.º 4
0
        public void ResultLogObjectWriter_DefaultIsEmpty()
        {
            var uut = new ResultLogObjectWriter();

            Assert.IsNull(uut.Tool);
            Assert.AreEqual(0, uut.ResultList.Count);
        }
        public void ResultLogObjectWriter_ToolInfoMayNotBeWrittenMoreThanOnce()
        {
            var uut = new ResultLogObjectWriter();

            uut.WriteToolAndRunInfo(s_defaultToolInfo, s_defaultRunInfo);
            uut.WriteToolAndRunInfo(s_defaultToolInfo, s_defaultRunInfo);
        }
Exemplo n.º 6
0
        public void ResultLogObjectWriter_AcceptsIssuesAndTool()
        {
            var uut = new ResultLogObjectWriter();

            uut.WriteTool(s_defaultTool);
            uut.WriteResult(s_defaultResult);

            Assert.AreEqual(s_defaultTool, uut.Tool);
            Assert.AreEqual(1, uut.ResultList.Count);
            Assert.AreEqual(s_defaultResult, uut.ResultList[0]);
        }
        public void ResultLogObjectWriter_AcceptsIssuesAndToolInfo()
        {
            var uut = new ResultLogObjectWriter();

            uut.WriteToolAndRunInfo(s_defaultToolInfo, s_defaultRunInfo);
            uut.WriteResult(s_defaultIssue);

            Assert.AreEqual(s_defaultToolInfo, uut.ToolInfo);
            Assert.AreEqual(1, uut.IssueList.Count);
            Assert.AreEqual(s_defaultIssue, uut.IssueList[0]);
            Assert.AreEqual(s_defaultRunInfo, uut.RunInfo);
        }
Exemplo n.º 8
0
        public void ResultLogObjectWriter_ResultsMayNotBeWrittenMoreThanOnce()
        {
            var uut     = new ResultLogObjectWriter();
            var results = new[] { s_defaultResult };

            uut.OpenResults();
            uut.WriteResults(results);
            uut.CloseResults();

            uut.OpenResults();
            uut.WriteResults(results);
            uut.CloseResults();
        }
Exemplo n.º 9
0
        public static ResultLogObjectWriter GetConverterObjects(ToolFileConverterBase converter, byte[] inputData)
        {
            var result = new ResultLogObjectWriter();
            using (var input = new MemoryStream(inputData))
            {
                converter.Convert(input, result);
            }

            return result;
        }
Exemplo n.º 10
0
 public void ToolFormatConverter_ConvertToStandardFormat_UnknownToolFormat()
 {
     var output = new ResultLogObjectWriter();
     using (var input = new MemoryStream())
     {
         _converter.ConvertToStandardFormat(0, input, output);
     }
 }
Exemplo n.º 11
0
 public void ToolFormatConverter_ConvertToStandardFormat_NullInputStream()
 {
     var output = new ResultLogObjectWriter();
     _converter.ConvertToStandardFormat(ToolFormat.AndroidStudio, null, output);
 }