コード例 #1
0
        public void TestOutfittingCosts()
        {
            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);
        }
コード例 #2
0
        public void VoiceAttackPluginTests_InitialisesNewFSUIPCInterface()
        {
            var mockInterface = new Mock <IFSUIPCInterface>();
            var mockFactory   = new Mock <IFSUIPCFactory>();

            mockFactory.Setup(factory => factory.createFSUIPCInterface(It.IsAny <IFSUIPC>(),
                                                                       It.IsAny <IOffsetFactory>())).Returns(mockInterface.Object);

            MyVAProxy proxy = new MyVAProxy();

            VoiceAttackPlugin.SetFSUIPCFactory(proxy, mockFactory.Object);

            // Call Init1
            VoiceAttackPlugin.VA_Init1(proxy);

            Assert.IsTrue(proxy.SessionState.ContainsKey(
                              VoiceAttackPlugin.SESSIONSTATE.KEY_FSUIPCINTERFACE));
            Assert.IsInstanceOfType(proxy.SessionState[
                                        VoiceAttackPlugin.SESSIONSTATE.KEY_FSUIPCINTERFACE], typeof(IFSUIPCInterface));

            mockInterface.Verify(x => x.initialise(proxy), 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);
        }