public void AddIntegration_DoesNotExcludeCurrentOne()
        {
            var sut = new SdkVersion();

            sut.AddIntegration("integration 1");
            sut.AddIntegration("integration 2");

            Assert.Equal(2, sut.Integrations.Count());
        }
Beispiel #2
0
        public void AddIntegration_DoesNotExcludeCurrentOne()
        {
            var sut = new SdkVersion
            {
                InternalIntegrations = ImmutableList.Create("integration 1")
            };

            sut.AddIntegration("integration 2");

            Assert.Equal(2, sut.Integrations.Count);
        }
        public void SerializeObject_AllPropertiesSetToNonDefault_SerializesValidObject()
        {
            var sut = new SdkVersion
            {
                Name    = "Sentry.Test.SDK",
                Version = "0.0.1-preview1",
            };

            sut.AddIntegration("integration 1");

            var actual = JsonSerializer.SerializeObject(sut);

            Assert.Equal("{\"integrations\":[\"integration 1\"],"
                         + "\"name\":\"Sentry.Test.SDK\","
                         + "\"version\":\"0.0.1-preview1\"}",
                         actual);
        }