Example #1
0
        public void TestSetup()
        {
            SetupGood();
            Assert.AreEqual(masterNodeApiGood.host, goodHost);
            var ex = Assert.Throws <Exception>(() => masterNodeApiGood.SetNetworkInfo(null));

            Assert.That(ex.Message, Is.EqualTo("networkInfo cannot be null"));
        }
Example #2
0
        void SetupBad()
        {
            calledBack = false;
            GameObject gameObject = new GameObject();

            gameObject.AddComponent <MasterNodeApi>();
            masterNodeApiBad = gameObject.GetComponent <MasterNodeApi>();
            masterNodeApiBad.SetNetworkInfo(badNetwork);
        }