Exemplo n.º 1
0
        public void CheckStateChanges(AtemState expected, Action <AtemState, AtemState> mutateStates = null)
        {
            AtemState sdkState = BuildSdkState();
            AtemState libState = BuildLibState();

            mutateStates?.Invoke(sdkState, libState);

            List <string> sdk = AtemStateComparer.AreEqual(expected, sdkState);
            List <string> lib = AtemStateComparer.AreEqual(expected, libState);

            if (sdk.Count > 0 || lib.Count > 0)
            {
                if (sdk.Count > 0)
                {
                    Output.WriteLine("SDK wrong");
                    sdk.ForEach(Output.WriteLine);
                }

                if (lib.Count > 0)
                {
                    Output.WriteLine("Lib wrong");
                    lib.ForEach(Output.WriteLine);
                }

                TestResult = false;
            }
        }
Exemplo n.º 2
0
        public void AssertStatesMatch()
        {
            List <string> before = AtemStateComparer.AreEqual(BuildSdkState(), BuildLibState());

            if (before.Count != 0 && Output != null)
            {
                Output.WriteLine("state mismatch:");
                before.ForEach(Output.WriteLine);
            }
            Assert.Empty(before);
        }