Esempio n. 1
0
        public virtual void TestPbRecordFactory()
        {
            RecordFactory pbRecordFactory = RecordFactoryPBImpl.Get();

            try
            {
                CounterGroup response = pbRecordFactory.NewRecordInstance <CounterGroup>();
                NUnit.Framework.Assert.AreEqual(typeof(CounterGroupPBImpl), response.GetType());
            }
            catch (YarnRuntimeException e)
            {
                Sharpen.Runtime.PrintStackTrace(e);
                NUnit.Framework.Assert.Fail("Failed to crete record");
            }
            try
            {
                GetCountersRequest response = pbRecordFactory.NewRecordInstance <GetCountersRequest
                                                                                 >();
                NUnit.Framework.Assert.AreEqual(typeof(GetCountersRequestPBImpl), response.GetType
                                                    ());
            }
            catch (YarnRuntimeException e)
            {
                Sharpen.Runtime.PrintStackTrace(e);
                NUnit.Framework.Assert.Fail("Failed to crete record");
            }
        }
Esempio n. 2
0
        public virtual void TestPbRecordFactory()
        {
            RecordFactory pbRecordFactory = RecordFactoryPBImpl.Get();

            try
            {
                LocalizerHeartbeatResponse response = pbRecordFactory.NewRecordInstance <LocalizerHeartbeatResponse
                                                                                         >();
                NUnit.Framework.Assert.AreEqual(typeof(LocalizerHeartbeatResponsePBImpl), response
                                                .GetType());
            }
            catch (YarnRuntimeException e)
            {
                Sharpen.Runtime.PrintStackTrace(e);
                NUnit.Framework.Assert.Fail("Failed to crete record");
            }
        }