예제 #1
0
        public void VoiceAttackPluginTests_InvokesMethodAndArgsOnFSUIPCInterface_1()
        {
            var       mockInterface = new Mock <IFSUIPCInterface>();
            MyVAProxy proxy         = new MyVAProxy();

            proxy.SessionState.Add(VoiceAttackPlugin.SESSIONSTATE.KEY_FSUIPCINTERFACE,
                                   mockInterface.Object);
            proxy.Context = "readOffset:ABC;2;myVar";

            // Call Invoke1
            VoiceAttackPlugin.VA_Invoke1(proxy);

            mockInterface.Verify(x => x.readOffset(0xABC, typeof(short), "myVar"), Times.AtMost(1));
        }
예제 #2
0
        public void VoiceAttackPluginTests_InvokesMethodAndArgsOnFSUIPCInterface_2()
        {
            var       mockInterface = new Mock <IFSUIPCInterface>();
            MyVAProxy proxy         = new MyVAProxy();

            proxy.SessionState.Add(VoiceAttackPlugin.SESSIONSTATE.KEY_FSUIPCINTERFACE,
                                   mockInterface.Object);
            proxy.Context = "beginMonitoringEvents:";

            // Call Invoke1
            VoiceAttackPlugin.VA_Invoke1(proxy);

            mockInterface.Verify(x => x.beginMonitoringEvents(), Times.AtMost(1));
        }
예제 #3
0
        public void TestVAVisitStarSystems()
        {
            Dictionary <string, object>    state          = new Dictionary <string, object>();
            Dictionary <string, short?>    shortIntValues = new Dictionary <string, short?>();
            Dictionary <string, string>    textValues     = new Dictionary <string, string>();
            Dictionary <string, int?>      intValues      = new Dictionary <string, int?>();
            Dictionary <string, decimal?>  decimalValues  = new Dictionary <string, decimal?>();
            Dictionary <string, bool?>     booleanValues  = new Dictionary <string, bool?>();
            Dictionary <string, DateTime?> dateTimeValues = new Dictionary <string, DateTime?>();
            Dictionary <string, object>    extendedValues = new Dictionary <string, object>();

            VoiceAttackPlugin.VA_Init1(ref state, ref shortIntValues, ref textValues, ref intValues, ref decimalValues, ref booleanValues, ref dateTimeValues, ref extendedValues);

            VoiceAttackPlugin.updateSystem("LFT 926");
            VoiceAttackPlugin.VA_Invoke1("system", ref state, ref shortIntValues, ref textValues, ref intValues, ref decimalValues, ref booleanValues, ref dateTimeValues, ref extendedValues);

            VoiceAttackPlugin.updateSystem("Shinrarta Dezhra");
            VoiceAttackPlugin.VA_Invoke1("system", ref state, ref shortIntValues, ref textValues, ref intValues, ref decimalValues, ref booleanValues, ref dateTimeValues, ref extendedValues);

            VoiceAttackPlugin.updateSystem("LFT 926");
            VoiceAttackPlugin.VA_Invoke1("system", ref state, ref shortIntValues, ref textValues, ref intValues, ref decimalValues, ref booleanValues, ref dateTimeValues, ref extendedValues);
        }