コード例 #1
0
 //ignore
 /// <exception cref="System.Exception"/>
 public virtual void TestGet()
 {
     TestGenericWritable.Foo foo = new TestGenericWritable.Foo();
     TestGenericWritable.FooGenericWritable generic = new TestGenericWritable.FooGenericWritable
                                                          ();
     generic.Set(foo);
     Assert.Equal(foo, generic.Get());
 }
コード例 #2
0
 /// <exception cref="System.Exception"/>
 public virtual void TestFooWritable()
 {
     System.Console.Out.WriteLine("Testing Writable wrapped in GenericWritable");
     TestGenericWritable.FooGenericWritable generic = new TestGenericWritable.FooGenericWritable
                                                          ();
     generic.SetConf(conf);
     TestGenericWritable.Foo foo = new TestGenericWritable.Foo();
     generic.Set(foo);
     TestWritable.TestWritable(generic);
 }
コード例 #3
0
 /// <exception cref="System.Exception"/>
 public virtual void TestSet()
 {
     TestGenericWritable.Foo foo = new TestGenericWritable.Foo();
     TestGenericWritable.FooGenericWritable generic = new TestGenericWritable.FooGenericWritable
                                                          ();
     //exception should not occur
     generic.Set(foo);
     try
     {
         //exception should occur, since IntWritable is not registered
         generic = new TestGenericWritable.FooGenericWritable();
         generic.Set(new IntWritable(1));
         Fail("Generic writable should have thrown an exception for a Writable not registered"
              );
     }
     catch (RuntimeException)
     {
     }
 }