Пример #1
0
            public void GetSetState()
            {
                Assert.ThrowsException <ArgumentNullException>(
                    () => Net.SetState(null));
                Assert.ThrowsException <IndexOutOfRangeException>(
                    () => Net.SetState(new float[5]));
                Net.SetState(new float[] { 1, 2, 3, 4 });
                var state = Net.GetState();

                Assert.AreEqual(1, state[0]);
                Assert.AreEqual(2, state[1]);
                Assert.AreEqual(3, state[2]);
                Assert.AreEqual(4, state[3]);
            }