public void FormatIPEndPoint()
        {
            var result = MongoApplicationInsightsTelemetry.FormatEndPoint(
                new IPEndPoint(new IPAddress(new byte[] { 0x7f, 0, 0, 1 }), 27017));

            result.Should().Be("127.0.0.1:27017");
        }
        public void FormatUnspecifiedDnsEndPoint()
        {
            var result = MongoApplicationInsightsTelemetry.FormatEndPoint(
                new DnsEndPoint("test", 27017));

            result.Should().Be("test:27017");
        }
        public void FormatIPv4DnsEndPoint()
        {
            var result = MongoApplicationInsightsTelemetry.FormatEndPoint(
                new DnsEndPoint("test", 27017, AddressFamily.InterNetwork));

            result.Should().Be("test:27017");
        }
            public Mocks(bool createTelemetry = true, MongoApplicationInsightsSettings settings = null)
            {
                StubTelemetry = new StubTelemetry();

                if (createTelemetry)
                {
                    var mongoClientSettings = MongoClientSettings.FromConnectionString(
                        "mongodb://localhost:27017/");

                    Telemetry = new MongoApplicationInsightsTelemetry(
                        mongoClientSettings,
                        TelemetryClient,
                        settings ?? new MongoApplicationInsightsSettings());
                }
            }