コード例 #1
0
        public void TestRoundtrip([ValueSource(nameof(Versions))] Version version)
        {
            var value       = new PluginIdentifier("A", version);
            var actualValue = BinarySerializerTest.Roundtrip(value);

            actualValue.Should().NotBeNull();
            actualValue.Should().NotBeSameAs(value);
            actualValue.Should().Be(value);
        }
コード例 #2
0
        public void TestRoundtrip()
        {
            var description = new PublishedPluginDescription
            {
                Author      = "Simon",
                Publisher   = "Dreamcatcher",
                Description = "And there was no one left",
                SizeInBytes = 2131412,
            };

            var actualDescription = BinarySerializerTest.Roundtrip(description);

            actualDescription.Author.Should().Be("Simon");
            actualDescription.Publisher.Should().Be("Dreamcatcher");
            actualDescription.Description.Should().Be("And there was no one left");
            actualDescription.SizeInBytes.Should().Be(2131412);
        }