예제 #1
0
        [Test] public void map_ReferencesToTmObjects()
        {
            tmProxy.map_ReferencesToTmObjects();

            tmProxy.TmStatus.assert_Not_Null();                 // until TM is started, this is the only one that should be set
            tmProxy.TmConfig.assert_Null();
            tmProxy.TmFileStorage.assert_Null();
            tmProxy.TmServer.assert_Null();
            tmProxy.TmUserData.assert_Null();
            tmProxy.TmXmlDatabase.assert_Null();
        }
        public void testFixtureSetUp()
        {
            nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor().start();
            tmProxy            = nUnitTests_Cassini.tmProxy();
            ieTeamMentor       = nUnitTests_Cassini.new_IE_TeamMentor(true);
            ie                 = ieTeamMentor.ie;

            nUnitTests_Cassini.siteUri.GET().assert_Contains("TeamMentor");     // make a request to trigger Asp.NET pipeline and TM Startup
            tmProxy.map_ReferencesToTmObjects();                                // these should be alive after startup
            tmConfig = tmProxy.TmConfig     .assert_Not_Null();                 // specially the TMConfig object
        }
예제 #3
0
        [Test] public void invoke_Instance()
        {
            tmProxy.map_ReferencesToTmObjects();

            tmProxy.get_Current <TM_StartUp>().assert_Null();

            tmProxy.invoke_Instance(typeof(TM_StartUp), "get_Version", new object[] {})      // this will invoke store the TM_StartUp value in the TM_StartUp.Current static propery
            .assert_Not_Null()
            .assert_Is_Equal_To(typeof(TM_StartUp).assembly().version());

            tmProxy.get_Current <TM_StartUp>().assert_Not_Null();

            tmProxy.invoke_Instance <string>(typeof(TM_StartUp), "get_Version")               // another way to invoke_Instance
            .assert_Not_Null()
            .assert_Is_Equal_To(typeof(TM_StartUp).assembly().version());
        }