Ejemplo n.º 1
0
        public void BenchTest()
        {
            JObject bench = JObject.Parse("{Seats: [{Id: 12}]}");
            bench.Add("Id", 1);

            Collection<SeatViewModel> seats = new Collection<SeatViewModel>();
            BenchViewModel b1 = new BenchViewModel(new VRPosition(100, 200, 300), 1, seats);
            Dictionary<int, BenchViewModel> benches = handler.Benches;
            benches.Add(b1.Id, b1);
            handler.Benches = benches;
            handler.Handle(bench);
            SeatViewModel s = new SeatViewModel(new VRPosition(100, 200, 300), 12);
            seats.Add(s);
            BenchViewModel b2 = new BenchViewModel(new VRPosition(100, 200, 300), 1, seats);

            Assert.AreEqual(b1.ToString(), b2.ToString());
        }