Esempio n. 1
0
        public void PingDisplayTextLabelNullReferencesUpdateTest()
        {
            NetworkPingDisplay pingDisplay = CreateMonoBehaviour <NetworkPingDisplay>();

            pingDisplay.Client = client;

            Assert.Throws <NullReferenceException>(() =>
            {
                pingDisplay.Update();
            });
        }
Esempio n. 2
0
        public void PingDisplayTextLabelNullReferencesUpdateTest()
        {
            var gameObject = new GameObject("pingDisplay", typeof(NetworkPingDisplay));

            NetworkPingDisplay pingDisplay = gameObject.GetComponent <NetworkPingDisplay>();

            pingDisplay.Client = client;

            Assert.Throws <NullReferenceException>(() =>
            {
                pingDisplay.Update();
            });
        }
Esempio n. 3
0
        public void PingDisplayTextChangedValue()
        {
            var gameObject = new GameObject("pingDisplay", typeof(NetworkPingDisplay), typeof(Text));

            NetworkPingDisplay pingDisplay = gameObject.GetComponent <NetworkPingDisplay>();

            pingDisplay.Client = client;
            pingDisplay.NetworkPingLabelText = gameObject.GetComponent <Text>();

            Text oldValue = pingDisplay.NetworkPingLabelText;

            pingDisplay.Update();

            Assert.That(oldValue != pingDisplay.NetworkPingLabelText, Is.False);
        }