public void SingleLookup()
        {
            TrialTermLookupService lookup = GetMappingService(new string[] { "EVSWithMultiple.txt", "Other.txt" });

            Assert.Equal(true, lookup.MappingContainsKey("c4872", false));
            Assert.Equal("Breast Cancer", lookup.GetTitleCase("c4872"), new MappingsComparer());
        }
        public void Create(string url, CTSSearchParams expected)
        {
            TrialTermLookupService lookupSvc = GetMappingService(new string[] { "EVSWithMultiple.txt", "Other.txt" });
            var mockZipLookupSvc             = GetZipLookupMock();

            // Create a new instance of the factory, passing in the loaded lookup service and
            // the mock zip lookup service.
            CTSSearchParamFactory factory = new CTSSearchParamFactory(lookupSvc, mockZipLookupSvc.Object);

            //Get the results of parsing the URL.
            CTSSearchParams actual = factory.Create(url);

            //Test the actual result to the expected.
            Assert.Equal(expected, actual, new CTSSearchParamsComparer());
        }
        public void LoadMapping()
        {
            TrialTermLookupService lookup = GetMappingService(new string[] { "EVSWithMultiple.txt", "Other.txt" });

            Assert.Equal("Breast Cancer", lookup.GetTitleCase("c4872"), new MappingsComparer());
            Assert.Equal("Stage I Breast Cancer", lookup.GetTitleCase("c88375"), new MappingsComparer());
            Assert.Equal("Stage I Breast Cancer", lookup.GetTitleCase("c85385"), new MappingsComparer());
            Assert.Equal("Stage I Breast Cancer", lookup.GetTitleCase("c85386"), new MappingsComparer());
            Assert.Equal("Virginia", lookup.Get("VA"), new MappingsComparer());
            Assert.Equal("Washington, D.C.", lookup.GetTitleCase("DC"), new MappingsComparer());
            Assert.Equal("Maryland", lookup.GetTitleCase("MD"), new MappingsComparer());
            Assert.Equal("Phase I", lookup.GetTitleCase("I"), new MappingsComparer());
            Assert.Equal("Phase II", lookup.GetTitleCase("II"), new MappingsComparer());
            Assert.Equal("Treatment", lookup.GetTitleCase("tt_treatment"), new MappingsComparer());
            Assert.Equal("Supportive Care", lookup.GetTitleCase("tt_supportive_care"), new MappingsComparer());
        }
        public void MultipleLookupWithError()
        {
            TrialTermLookupService lookup = GetMappingService(new string[] { "EVSWithMultiple.txt", "Other.txt" });

            Assert.Equal(false, lookup.MappingContainsKey("c88375,chicken,c88375", false));
        }
        public void MultipleLookup()
        {
            TrialTermLookupService lookup = GetMappingService(new string[] { "EVSWithMultiple.txt", "Other.txt" });

            Assert.Equal("Stage I Breast Cancer", lookup.GetTitleCase("c88375,c88375"), new MappingsComparer());
        }