コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldStoreTheSerialVersionIdOfAClassTheFirstTimeItsDeserialised() throws java.io.IOException, ClassNotFoundException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldStoreTheSerialVersionIdOfAClassTheFirstTimeItsDeserialised()
        {
            // given
            MemberIsAvailable memberIsAvailable = memberIsAvailable();
            Payload           payload           = PayloadFor(memberIsAvailable);
            VersionMapper     versionMapper     = new VersionMapper();

            // when
            (new LenientObjectInputStream(InputStreamFor(payload), versionMapper)).readObject();

            // then
//JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
            assertTrue(versionMapper.HasMappingFor(memberIsAvailable.GetType().FullName));
//JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
            assertEquals(SerialVersionUIDFor(memberIsAvailable), versionMapper.MappingFor(memberIsAvailable.GetType().FullName));
        }
コード例 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public LenientObjectInputStream(java.io.ByteArrayInputStream fis, VersionMapper versionMapper) throws java.io.IOException
        public LenientObjectInputStream(MemoryStream fis, VersionMapper versionMapper) : base(fis)
        {
            this._versionMapper = versionMapper;
        }
コード例 #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public LenientObjectOutputStream(java.io.ByteArrayOutputStream bout, VersionMapper versionMapper) throws java.io.IOException
        public LenientObjectOutputStream(MemoryStream bout, VersionMapper versionMapper) : base(bout)
        {
            this._versionMapper = versionMapper;
        }