Exemplo n.º 1
0
        public void InternalreportinstallsuccessCommandCollectExeNameWithEventname()
        {
            MockTelemetry mockTelemetry = new MockTelemetry();

            string[] args = { "c:\\mypath\\dotnet-sdk-latest-win-x64.exe" };

            InternalReportinstallsuccess.ProcessInputAndSendTelemetry(args, mockTelemetry);

            mockTelemetry.EventName.Should().Be("reportinstallsuccess");
            mockTelemetry.Properties["exeName"].Should().Be("dotnet-sdk-latest-win-x64.exe");
        }
Exemplo n.º 2
0
        public void InternalreportinstallsuccessCommandCollectExeNameWithEventname()
        {
            FakeRecordEventNameTelemetry fakeTelemetry = new FakeRecordEventNameTelemetry();

            string[] args = { "c:\\mypath\\dotnet-sdk-latest-win-x64.exe" };

            InternalReportinstallsuccess.ProcessInputAndSendTelemetry(args, fakeTelemetry);

            fakeTelemetry
            .LogEntries.Should()
            .Contain(e => e.EventName == "install/reportsuccess" && e.Properties.ContainsKey("exeName") &&
                     e.Properties["exeName"] == Sha256Hasher.Hash("DOTNET-SDK-LATEST-WIN-X64.EXE"));
        }