Exemplo n.º 1
0
        public void ConstructorTest()
        {
            string         dcaRootStoreLocation = "biabia";
            TraceLogger    traceLogger          = new TraceLogger(new MockUpTraceEventProvider());
            TelemetryStore result = new TelemetryStore(dcaRootStoreLocation, traceLogger);

            Assert.AreEqual(dcaRootStoreLocation, result.DiagnosticsStoreRootLocation);
            Assert.AreSame(traceLogger, result.Logger);
        }
Exemplo n.º 2
0
        public void GetTelemetriesTest()
        {
            string dcaRootFolder = Path.Combine(TestUtility.TestDirectory, "myDcaLocation11");

            TelemetryStoreTest.PrepareTelemetryData(dcaRootFolder);

            TelemetryStore store = new TelemetryStore(dcaRootFolder, new TraceLogger(new MockUpTraceEventProvider()));

            TelemetryCollection[] result = store.GetTelemetries();
            Assert.AreEqual(4, result.Length);
            Assert.IsTrue(result.All(p => p != null));

            Directory.Delete(dcaRootFolder, recursive: true);
        }