Пример #1
0
        public IActionResult DownList(QueryPageUrlModel item)
        {
            using (var db = new DataContext(App.DbKey.Api))
            {
                var page = new PageModel();
                page.PageSize = item.PageSize == 0 ? 10 : item.PageSize;
                page.PageId   = item.PageId == 0 ? 1 : item.PageId;
                var info = new PageResult();

                if (!string.IsNullOrEmpty(item.Key))
                {
                    var param = new List <OracleParameter>();
                    param.Add(new OracleParameter {
                        ParameterName = "Key", Value = item.Key.ToUpper()
                    });
                    info = FastMap.QueryPage(page, "Api.DownUrl", param.ToArray(), db);
                }
                else
                {
                    info.list = new List <Dictionary <string, object> >();
                }

                //是否显示下游表单
                if (item.Success == "1" && info.list.Count > 0)
                {
                    info.list.ForEach(a => a.Add("IsShowForm", item.Success));
                }

                return(PartialView("DownList", info));
            }
        }
Пример #2
0
        public IActionResult List(QueryPageUrlModel item)
        {
            using (var db = new DataContext(App.DbKey.Api))
            {
                var page = new PageModel();
                page.PageSize = item.PageSize == 0 ? 10 : item.PageSize;
                page.PageId   = item.PageId == 0 ? 1 : item.PageId;

                var param = new List <OracleParameter>();
                param.Add(new OracleParameter {
                    ParameterName = "Key", Value = item.Key
                });
                param.Add(new OracleParameter {
                    ParameterName = "Ip", Value = item.Ip
                });
                param.Add(new OracleParameter {
                    ParameterName = "Day", Value = item.Day.ToDate("yyyy-MM-dd").ToDate()
                });
                param.Add(new OracleParameter {
                    ParameterName = "Success", Value = item.Success
                });

                var info = FastMap.QueryPage(page, "Api.Log", param.ToArray(), db);

                return(PartialView("List", info));
            }
        }
Пример #3
0
        /// <summary>
        /// 统计列表
        /// </summary>
        /// <param name="DpetID">科室id</param>
        /// <param name="Start">开始时间</param>
        /// <param name="Stop">结束时间</param>
        /// <param name="page">当前页</param>
        /// <param name="limit">每页几条</param>
        /// <returns></returns>
        public ActionResult GetStatisticsList(string DpetID, string Start, string Stop, int page, int limit)
        {
            using (var db = new DataContext(AppEmr.DbConst.EmrDb))
            {
                var param = new List <OracleParameter>();
                param.Add(new OracleParameter {
                    ParameterName = "DeptID", Value = DpetID
                });
                param.Add(new OracleParameter {
                    ParameterName = "Start", Value = Start
                });
                param.Add(new OracleParameter {
                    ParameterName = "Stop", Value = Stop
                });


                //如果page为0 输出所有的数据
                if (page == 0 && limit == 0)
                {
                    var list = FastMap.Query("Dept.KeepWardLog.List", param.ToArray(), db);
                    return(Json(new { code = 0, data = list, count = list.Count }));
                }

                //分页
                var pageModel = new PageModel();
                pageModel.PageId   = page == 0 ? 1 : page;
                pageModel.PageSize = limit == 0 ? 10 : limit;
                var pageInfo = FastMap.QueryPage(pageModel, "Dept.KeepWardLog.List", param.ToArray(), db);
                return(Json(new { code = 0, data = pageInfo.list, count = pageInfo.pModel.TotalRecord }));
            }
        }
Пример #4
0
        public IActionResult OnPostDel(DelParam item)
        {
            var result = new Dictionary <string, object>();

            if (string.IsNullOrEmpty(item.name.ToLower().Replace(".xml", "")))
            {
                result.Add("msg", "xml文件名填写不正确");
            }
            else
            {
                System.IO.File.Delete(item.name);

                var map = BaseConfig.GetValue <SqlMap>("SqlMap", FastApiExtension.config.mapFile, false);
                if (!map.Path.Exists(a => string.Compare(a, item.name) == 0))
                {
                    var dic = new Dictionary <string, object>();
                    map.Path.Remove(item.name);
                    dic.Add("SqlMap", map);
                    var json = BaseJson.ModelToJson(dic);
                    System.IO.File.WriteAllText(FastApiExtension.config.mapFile, json);

                    FastMap.InstanceMap();
                }

                result.Add("msg", "操作成功");
            }
            return(new JsonResult(result));
        }
Пример #5
0
 public Startup(IConfiguration configuration)
 {
     Configuration = configuration;
     FastMap.InstanceProperties("FastApiGatewayDb.DataModel", "FastApiGatewayDb.Ui.dll");
     FastMap.InstanceTable("FastApiGatewayDb.DataModel", "FastApiGatewayDb.Ui.dll");
     FastMap.InstanceMap();
 }
Пример #6
0
 public CompiledPartitionedAfaPipe_MultiEventList(Streamable <TKey, TRegister> stream, IStreamObserver <TKey, TRegister> observer, object afa, long maxDuration)
     : base(stream, observer, afa, maxDuration, false)
 {
     this.getPartitionKey     = GetPartitionExtractor <TPartitionKey, TKey>();
     this.activeStates        = new FastMap <GroupedActiveState <TKey, TRegister> >();
     this.activeFindTraverser = new FastMap <GroupedActiveState <TKey, TRegister> > .FindTraverser(this.activeStates);
 }
Пример #7
0
        public IActionResult Del(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                return(Json(new { msg = "xml文件名不能为空" }));
            }
            else if (string.IsNullOrEmpty(name.ToLower().Replace(".xml", "")))
            {
                return(Json(new { msg = "xml文件名填写不正确" }));
            }
            else
            {
                System.IO.File.Delete(name);

                var map = BaseConfig.GetValue <SqlMap>("SqlMap", FastApiExtension.config.mapFile);
                if (!map.Path.Exists(a => string.Compare(a, name) == 0))
                {
                    var dic = new Dictionary <string, object>();
                    map.Path.Remove(name);
                    dic.Add("SqlMap", map);
                    var json = BaseJson.ModelToJson(dic);
                    System.IO.File.WriteAllText(FastApiExtension.config.mapFile, json);

                    FastMap.InstanceMap();
                }

                return(Json(new { msg = "操作成功" }));
            }
        }
Пример #8
0
        public IActionResult Del(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                return(Json(new { msg = "xml文件名不能为空" }));
            }
            else if (string.IsNullOrEmpty(name.ToLower().Replace(".xml", "")))
            {
                return(Json(new { msg = "xml文件名填写不正确" }));
            }
            else
            {
                var xmlPath = string.Format("map/{0}", name);
                System.IO.File.Delete(xmlPath);

                var map = BaseConfig.GetValue <SqlMap>("SqlMap", "map.json");
                if (map.Path.Exists(a => a.ToLower() == string.Format("map/{0}", name.ToLower())))
                {
                    var dic = new Dictionary <string, object>();
                    map.Path.Remove("map/" + name);
                    dic.Add("SqlMap", map);
                    var json = BaseJson.ModelToJson(dic);
                    System.IO.File.WriteAllText("map.json", json);

                    FastMap.InstanceMap();
                }

                return(Json(new { msg = "操作成功" }));
            }
        }
Пример #9
0
        /// <summary>
        /// 完整性检查列表
        /// </summary>
        /// <param name="DpetID">科室</param>
        /// <param name="Start">出院开始时间</param>
        /// <param name="Stop">出院结束时间</param>
        /// <param name="Zyh">病人ID或病案号(健康卡号)</param>
        /// <param name="Name">病人姓名</param>
        /// <param name="page">当前页</param>
        /// <param name="limit">每页几条</param>
        /// <returns></returns>
        public ActionResult MedicalRecordCheckList(string DpetID, string Start, string Stop, string Zyh, string Name, int page, int limit)
        {
            using (var db = new DataContext(AppEmr.DbConst.EmrDb))
            {
                var param = new List <OracleParameter>();
                param.Add(new OracleParameter {
                    ParameterName = "DpetID", Value = DpetID
                });
                param.Add(new OracleParameter {
                    ParameterName = "LeaveTimeStart", Value = Start
                });
                param.Add(new OracleParameter {
                    ParameterName = "LeaveTimeStop", Value = Stop
                });
                param.Add(new OracleParameter {
                    ParameterName = "Zyh", Value = Zyh
                });
                param.Add(new OracleParameter {
                    ParameterName = "Name", Value = Name
                });

                //如果page为0 输出所有的数据
                if (page == 0 && limit == 0)
                {
                    var list = FastMap.Query("Inpatient.MedicalRecordCheck.List", param.ToArray(), db);
                    return(Json(new { code = 0, data = list, count = list.Count }));
                }
                //分页
                var pageModel = new PageModel();
                pageModel.PageId   = page == 0 ? 1 : page;
                pageModel.PageSize = limit == 0 ? 10 : limit;
                var pageInfo = FastMap.QueryPage(pageModel, "Inpatient.MedicalRecordCheck.List", param.ToArray(), db);
                return(Json(new { code = 0, data = pageInfo.list, count = pageInfo.pModel.TotalRecord }));
            }
        }
Пример #10
0
        private static void ReuseTest()
        {
            var map = new FastMap <string>(5);

            Assert.AreEqual(1, map.Insert(5, "0"));
            Assert.AreEqual(2, map.Insert(5, "1"));
            Assert.AreEqual(3, map.Insert(5, "2"));
            Assert.AreEqual(4, map.Insert(5, "3"));
            Assert.AreEqual(5, map.Insert(5, "4"));

            map.Remove(3);
            Assert.AreEqual(3, map.Insert(5, "5"));

            map.Remove(2);
            map.Remove(1);
            map.Remove(5);
            map.Remove(3);
            map.Remove(4);
            Assert.AreEqual(4, map.Insert(5, "6"));
            Assert.AreEqual(3, map.Insert(5, "7"));
            Assert.AreEqual(5, map.Insert(5, "8"));
            Assert.AreEqual(1, map.Insert(5, "9"));
            Assert.AreEqual(2, map.Insert(5, "10"));

            Assert.AreEqual(6, map.Insert(5, "11"));
        }
Пример #11
0
        public void testNull1()
        {
            IDictionary <String, String> map = new FastMap <String, String>();

            Assert.IsNull(map.get(null));
            map.put(null, "bar");
        }
Пример #12
0
        public void testValues()
        {
            FastMap <String, String> map      = buildTestFastMap();
            IEnumerable <String>     expected = Sets.newHashSetWithExpectedSize(3);

            expected.add("bar");
            expected.add("bang");
            expected.add("beta");
            IEnumerable <String> actual = map.values();

            Assert.True(expected.containsAll(actual));
            Assert.True(actual.containsAll(expected));
            IEnumerable <String> it = actual.iterator();

            while (it.hasNext())
            {
                String value = it.next();
                if (!"bang".Equals(value))
                {
                    it.remove();
                }
            }
            Assert.True(map.containsValue("bang"));
            Assert.False(map.containsValue("bar"));
            Assert.False(map.containsValue("beta"));
        }
Пример #13
0
        public void testVersusHashMap()
        {
            IDictionary <Integer, String> actual   = new FastMap <Integer, String>(1, 1000000);
            IDictionary <Integer, String> expected = Maps.newHashMapWithExpectedSize(1000000);
            Random r = RandomUtils.getRandom();

            for (int i = 0; i < 1000000; i++)
            {
                double  d   = r.nextDouble();
                Integer key = r.nextInt(100);
                if (d < 0.4)
                {
                    Assert.AreEqual(expected.get(key), actual.get(key));
                }
                else
                {
                    if (d < 0.7)
                    {
                        Assert.AreEqual(expected.put(key, "foo"), actual.put(key, "foo"));
                    }
                    else
                    {
                        Assert.AreEqual(expected.remove(key), actual.remove(key));
                    }
                    Assert.AreEqual(expected.Count, actual.Count);
                    Assert.AreEqual(expected.isEmpty(), actual.isEmpty());
                }
            }
        }
Пример #14
0
        public void TestVersusDictionary()
        {
            FastMap <int, String>     actual   = new FastMap <int, String>(1, 1000000);
            IDictionary <int, String> expected = new Dictionary <int, String>(1000000);
            Random r = RandomUtils.GetRandom();

            for (int i = 0; i < 1000000; i++)
            {
                double d   = r.NextDouble();
                int    key = r.Next(100);
                if (d < 0.4)
                {
                    Assert.AreEqual(expected[key], actual[key]);
                }
                else
                {
                    if (d < 0.7)
                    {
                        //Assert.AreEqual(expected.Add(key, "foo"), actual.Add(key,"foo"));
                    }
                    else
                    {
                        Assert.AreEqual(expected.Remove(key), actual.Remove(key));
                    }
                    Assert.AreEqual(expected.Count, actual.Count);
                }
            }
        }
Пример #15
0
        public Task <Dictionary <string, object> > XmlDelAsyn(object name)
        {
            var result = new Dictionary <string, object>();

            if (string.IsNullOrEmpty(name.ToStr().ToLower().Replace(".xml", "")))
            {
                result.Add("msg", "xml文件名填写不正确");
            }
            else
            {
                System.IO.File.Delete(name.ToStr());
                var map = BaseConfig.GetValue <SqlMap>("SqlMap", "map.json", false);
                if (map.Path.Exists(a => a.ToLower() == string.Format("map/{0}", name.ToStr().ToLower())))
                {
                    var dic = new Dictionary <string, object>();
                    map.Path.Remove("map/" + name.ToStr());
                    dic.Add("SqlMap", map);
                    var json = BaseJson.ModelToJson(dic);
                    System.IO.File.WriteAllText("map.json", json);

                    FastMap.InstanceMap();
                }

                result.Add("msg", "操作成功");
            }
            return(Task.FromResult(result));
        }
        protected override void UpdatePointers()
        {
            this.activeFindTraverser = new FastMap <GroupedActiveStateAccumulator <TKey, TPayload, TRegister, TAccumulator> > .FindTraverser(this.activeStates);

            this.keyHeadsFindTraverser = new FastMap <TKey> .FindTraverser(this.keyHeads);

            this.keyHeadsVisibleTraverser = new FastMap <TKey> .VisibleTraverser(this.keyHeads);
        }
Пример #17
0
 public void testClear() {
   IDictionary<String, String> map = new FastMap<String, String>();
   map.put("foo", "bar");
   map.clear();
   Assert.AreEqual(0, map.Count);
   Assert.True(map.isEmpty());
   Assert.IsNull(map.get("foo"));
 }
Пример #18
0
        protected override void UpdatePointers()
        {
            this.activeFindTraverser = new FastMap <GroupedActiveState <TKey, TRegister> > .FindTraverser(this.activeStates);

            this.eventListTraverser = new FastMap <SavedEventList <TKey, TPayload> > .FindTraverser(this.currentTimestampEventList);

            this.allEventListTraverser = new FastMap <SavedEventList <TKey, TPayload> > .VisibleTraverser(this.currentTimestampEventList);
        }
Пример #19
0
        public void testPutAndGet()
        {
            IDictionary <string, string> map = new FastMap <String, String>();

            Assert.IsNull(map.get("foo"));
            map.put("foo", "bar");
            Assert.AreEqual("bar", map.get("foo"));
        }
Пример #20
0
 public void TestPutAndGet()
 {
     FastMap<String, String> map = new FastMap<String, String>();
     Assert.IsNull(map["foo"]);
     
     map.Add("foo", "bar");
     Assert.AreEqual("bar", map["foo"]);
 }
Пример #21
0
        public void TestRehash()
        {
            FastMap <String, String> map = BuildTestFastMap();

            map.Remove("foo");
            map.Rehash();
            Assert.IsNull(map["foo"]);
            Assert.AreEqual("bang", map["baz"]);
        }
Пример #22
0
 internal InvisibleTraverser(FastMap <T> map)
 {
     this.map             = map;
     this.prevIndex       = 0;
     this.prevIndexIsHead = false;
     this.currIndex       = 0;
     this.currIndexIsHead = true;
     this.nextIndex       = ~map.invisibleHead;
 }
Пример #23
0
        public void testRehash()
        {
            FastMap <String, String> map = buildTestFastMap();

            map.remove("foo");
            map.rehash();
            Assert.IsNull(map.get("foo"));
            Assert.AreEqual("bang", map.get("baz"));
        }
Пример #24
0
        public void testGrow()
        {
            IDictionary <String, String> map = new FastMap <String, String>(1, FastMap.NO_MAX_SIZE);

            map.put("foo", "bar");
            map.put("baz", "bang");
            Assert.AreEqual("bar", map.get("foo"));
            Assert.AreEqual("bang", map.get("baz"));
        }
Пример #25
0
        private static FastMap <String, String> buildTestFastMap()
        {
            FastMap <String, String> map = new FastMap <String, String>();

            map.put("foo", "bar");
            map.put("baz", "bang");
            map.put("alpha", "beta");
            return(map);
        }
Пример #26
0
        public void TestPutAndGet()
        {
            FastMap <String, String> map = new FastMap <String, String>();

            Assert.IsNull(map["foo"]);

            map.Add("foo", "bar");
            Assert.AreEqual("bar", map["foo"]);
        }
Пример #27
0
 public void TestClear()
 {
     FastMap<String, String> map = new FastMap<String, String>();
     map.Add("foo", "bar");
     map.Clear();
     Assert.AreEqual(0, map.Count);
     Assert.IsTrue(map.IsEmpty);
     Assert.IsNull(map["foo"]);
 }
Пример #28
0
        public void testGrow()
        {
            FastMap <String, String> map = new FastMap <String, String>(1, FastMap <string, string> .NO_MAX_SIZE);

            map.Add("foo", "bar");
            map.Add("baz", "bang");
            Assert.AreEqual("bar", map["foo"]);
            Assert.AreEqual("bang", map["baz"]);
        }
Пример #29
0
        public void TestClear()
        {
            FastMap <String, String> map = new FastMap <String, String>();

            map.Add("foo", "bar");
            map.Clear();
            Assert.AreEqual(0, map.Count);
            Assert.IsTrue(map.IsEmpty);
            Assert.IsNull(map["foo"]);
        }
Пример #30
0
        public void testClear()
        {
            IDictionary <String, String> map = new FastMap <String, String>();

            map.put("foo", "bar");
            map.clear();
            Assert.AreEqual(0, map.Count);
            Assert.True(map.isEmpty());
            Assert.IsNull(map.get("foo"));
        }
Пример #31
0
 internal FindTraverser(FastMap <T> map, int hash, int currIndex, int nextIndex)
 {
     this.map             = map;
     this.hash            = hash;
     this.prevIndex       = 0;
     this.prevIndexIsHead = false;
     this.currIndex       = currIndex;
     this.currIndexIsHead = true;
     this.nextIndex       = nextIndex;
 }
Пример #32
0
 internal FindTraverser(FastMap <T> map, int hash)
 {
     this.map             = map;
     this.hash            = hash;
     this.prevIndex       = 0;
     this.prevIndexIsHead = false;
     this.currIndex       = (hash & NotHighestBit) % map.capacity;
     this.currIndexIsHead = true;
     this.nextIndex       = map.bucketHeads[this.currIndex];
 }
Пример #33
0
 public FindTraverser(FastMap <T> map)
 {
     this.map             = map;
     this.hash            = 0;
     this.prevIndex       = 0;
     this.prevIndexIsHead = false;
     this.currIndex       = 0;
     this.currIndexIsHead = false;
     this.nextIndex       = 0;
 }
Пример #34
0
 public void testSizeEmpty() {
   IDictionary<String, String> map = new FastMap<String, String>();
   Assert.AreEqual(0, map.Count);
   Assert.True(map.isEmpty());
   map.put("foo", "bar");
   Assert.AreEqual(1, map.Count);
   Assert.False(map.isEmpty());
   map.remove("foo");
   Assert.AreEqual(0, map.Count);
   Assert.True(map.isEmpty());
 }
Пример #35
0
 public void TestSizeEmpty()
 {
     FastMap<String, String> map = new FastMap<String, String>();
     Assert.AreEqual(0, map.Count);
     Assert.IsTrue(map.IsEmpty);
     map.Add("foo", "bar");
     Assert.AreEqual(1, map.Count);
     Assert.IsFalse(map.IsEmpty);
     map.Remove("foo");
     Assert.AreEqual(0, map.Count);
     Assert.IsTrue(map.IsEmpty);
 }
Пример #36
0
        public void TestNull() 
        {
            FastMap<String, String> map = new FastMap<String, String>();
            try
            {
                map.Add(null, "bar");
                Assert.Fail("Should have thrown NullReferenceException");
            }
            catch (ArgumentNullException)
            {
            }

            try
            {
                map.Add("foo", null);
                Assert.Fail("Should have thrown ArgumentNullException");
            }
            catch (ArgumentNullException)
            {
                // good
            }
            Assert.IsNull(map[null]);
        }
Пример #37
0
 public void testNull2() {
   IDictionary<String, String> map = new FastMap<String, String>();
   map.put("foo", null);
 }
Пример #38
0
 public void testNull1() {
   IDictionary<String, String> map = new FastMap<String, String>();
   Assert.IsNull(map.get(null));
   map.put(null, "bar");
 }
Пример #39
0
 public void testMaxSize() {
   IDictionary<String, String> map = new FastMap<String, String>(1, 1);
   map.put("foo", "bar");
   Assert.AreEqual(1, map.Count);
   map.put("baz", "bang");
   Assert.AreEqual(1, map.Count);
   Assert.IsNull(map.get("foo"));
   map.put("baz", "buzz");
   Assert.AreEqual(1, map.Count);
   Assert.AreEqual("buzz", map.get("baz"));
 }
Пример #40
0
 public void testPutAndGet() {
   IDictionary<string, string> map = new FastMap<String, String>();
   Assert.IsNull(map.get("foo"));
   map.put("foo", "bar");
   Assert.AreEqual("bar", map.get("foo"));
 }
Пример #41
0
 public void testVersusHashMap() {
   IDictionary<Integer, String> actual = new FastMap<Integer, String>(1, 1000000);
   IDictionary<Integer, String> expected = Maps.newHashMapWithExpectedSize(1000000);
   Random r = RandomUtils.getRandom();
   for (int i = 0; i < 1000000; i++) {
     double d = r.nextDouble();
     Integer key = r.nextInt(100);
     if (d < 0.4) {
       Assert.AreEqual(expected.get(key), actual.get(key));
     } else {
       if (d < 0.7) {
         Assert.AreEqual(expected.put(key, "foo"), actual.put(key, "foo"));
       } else {
         Assert.AreEqual(expected.remove(key), actual.remove(key));
       }
       Assert.AreEqual(expected.Count, actual.Count);
       Assert.AreEqual(expected.isEmpty(), actual.isEmpty());
     }
   }
 }
Пример #42
0
 public void TestVersusDictionary()
 {
     FastMap<int, String> actual = new FastMap<int, String>(1, 1000000);
     IDictionary<int, String> expected = new Dictionary<int, String>(1000000);
     Random r = RandomUtils.GetRandom();
     for (int i = 0; i < 1000000; i++)
     {
         double d = r.NextDouble();
         int key = r.Next(100);
         if (d < 0.4)
         {
             Assert.AreEqual(expected[key], actual[key]);
         }
         else
         {
             if (d < 0.7)
             {
                 //Assert.AreEqual(expected.Add(key, "foo"), actual.Add(key,"foo"));
             }
             else
             {
                 Assert.AreEqual(expected.Remove(key), actual.Remove(key));
             }
             Assert.AreEqual(expected.Count, actual.Count);
         }
     }
 }
Пример #43
0
 public void TestMaxSize()
 {
     FastMap<String, String> map = new FastMap<String, String>(1, 1);
     map.Add("foo", "bar");
     Assert.AreEqual(1, map.Count);
     map.Add("baz", "bang");
     Assert.AreEqual(1, map.Count);
     Assert.IsNull(map["foo"]);
     map.Add("baz", "buzz");
     Assert.AreEqual(1, map.Count);
     Assert.AreEqual("buzz", map["baz"]);
 }
Пример #44
0
 private static FastMap<String, String> BuildTestFastMap()
 {
     FastMap<String, String> map = new FastMap<String, String>();
     map.Add("foo", "bar");
     map.Add("baz", "bang");
     map.Add("alpha", "beta");
     return map;
 }
Пример #45
0
 public void testGrow()
 {
     FastMap<String, String> map = new FastMap<String, String>(1, FastMap<string,string>.NO_MAX_SIZE);
     map.Add("foo", "bar");
     map.Add("baz", "bang");
     Assert.AreEqual("bar", map["foo"]);
     Assert.AreEqual("bang", map["baz"]);
 }
Пример #46
0
 public void testGrow() {
   IDictionary<String, String> map = new FastMap<String, String>(1, FastMap.NO_MAX_SIZE);
   map.put("foo", "bar");
   map.put("baz", "bang");
   Assert.AreEqual("bar", map.get("foo"));
   Assert.AreEqual("bang", map.get("baz"));
 }