Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldMapSimpleRecordWithString() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldMapSimpleRecordWithString()
        {
            // When
            OutputMapper mapper = mapper(typeof(SingleStringFieldRecord));

            // Then
            assertThat(mapper.Signature(), contains(outputField("name", NTString)));
            assertThat(asList(mapper.Apply(new SingleStringFieldRecord("hello, world!"))), contains("hello, world!"));
        }
Beispiel #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldSkipStaticFields() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldSkipStaticFields()
        {
            // When
            OutputMapper mapper = mapper(typeof(RecordWithStaticFields));

            // Then
            assertThat(mapper.Signature(), contains(outputField("includeMe", NTString)));
            assertThat(asList(mapper.Apply(new RecordWithStaticFields("hello, world!"))), contains("hello, world!"));
        }