예제 #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"));
        }
예제 #2
0
        void SetupBad()
        {
            calledBack = false;
            GameObject gameObject = new GameObject();

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