Beispiel #1
0
        void Copy_Values_From_Constructor_And_From_Append()
        {
            var originalValues = new Dictionary <string, int>()
            {
                ["A"] = 1,
                ["B"] = 2,
            };

            var appendValues = new Dictionary <string, int>()
            {
                ["A"] = 3,
                ["C"] = 4,
            };

            var expectedValues = new Dictionary <string, int>()
            {
                ["A"] = 1,
                ["B"] = 2,
                ["C"] = 4,
            };


            var info = new TelemetryInfo <int>(originalValues);

            info.Append(appendValues);


            Check.That(info.GetDictionary()).ContainsExactly(expectedValues);
        }
Beispiel #2
0
        void Be_Created_With_Empty_Dictionary()
        {
            var info = new TelemetryInfo <int>();

            Check.That(info.GetDictionary()).IsNotNull().And.IsEmpty();
            Check.That(info.IsEmpty).IsTrue();
        }
Beispiel #3
0
        void Copy_Values_From_Constructor()
        {
            var originalValues = new Dictionary <string, int>()
            {
                ["A"] = 1,
                ["B"] = 2,
            };

            var info = new TelemetryInfo <int>(originalValues);


            Check.That(info.GetDictionary()).IsNotNull().And.ContainsExactly(originalValues).And.Not
            .IsSameReferenceAs(originalValues);

            Check.That(info.IsEmpty).IsFalse();
        }