예제 #1
0
        public void TestBackgroundEventToString()
        {
            string s = "{\"1\":{\"time\":1429192800000,\"event\":1},\"2\":{\"time\":1429192800000,\"event\":1}}";
            Dictionary <string, Dictionary <string, long> > dict = new Dictionary <string, Dictionary <string, long> >
            {
                {
                    "1", new Dictionary <string, long> {
                        { "time", 1429192800000 }, { "event", (long)BeaconEventType.Enter }
                    }
                },
                {
                    "2", new Dictionary <string, long> {
                        { "time", 1429192800000 }, { "event", (long)BeaconEventType.Enter }
                    }
                }
            };

            Assert.AreEqual(s, FileStorageHelper.BackoundEventsToString(dict));
        }