public void GetValueOfCustomIndexerPropertyWithMalformedIndexer()
		{
			ObjectWrapper wrapper = GetWrapper();
			Honey darwin = new Honey(new string[] {"dickens", "of gaunt"});
			wrapper.WrappedInstance = darwin;
            Assert.Throws<InvalidPropertyException>(() => wrapper.GetPropertyValue("AlsoKnownAs[1"));
		}
		public void GetChainedIndexers()
		{
			Honey to = new Honey(new string[] {"wee", "jakey", "ned"});
			ObjectWrapper wrapper = GetWrapper(to);
			Assert.AreEqual('j', wrapper.GetPropertyValue("AlsoKnownAs[1][0]"));
		}
		public void GetValueOfCustomIndexerProperty()
		{
			ObjectWrapper wrapper = GetWrapper();
			Honey darwin = new Honey(new string[] {"dickens", "of gaunt"});
			wrapper.WrappedInstance = darwin;
			string alias = (string) wrapper.GetPropertyValue("AlsoKnownAs[1]");
			Assert.AreEqual("of gaunt", alias);

            alias = (string) wrapper.GetPropertyValue("[1]");
		    Assert.AreEqual("of gaunt", alias, "indexer on object not working.");
		    wrapper.SetPropertyValue("Item[1]", "of foobar");
            alias = (string)wrapper.GetPropertyValue("[1]");
            Assert.AreEqual("of foobar", alias, "indexer on object not working.");
		    
		}
			public Milk(Honey[] honeys)
			{
			}
Пример #5
0
        private void OnOpenInBrowserClick(object sender, RoutedEventArgs e)
        {
            string BuildLink = Honey.LinkStructureBuilder(MonsterHunter.Player.GetPlayerGear());

            Process.Start(BuildLink);
        }
Пример #6
0
        private void OnCopyToClipboardClick(object sender, RoutedEventArgs e)
        {
            string BuildLink = Honey.LinkStructureBuilder(MonsterHunter.Player.GetPlayerGear());

            Clipboard.SetData(DataFormats.Text, BuildLink);
        }
Пример #7
0
		public void GetValueOfCustomIndexerPropertyWithMalformedIndexer()
		{
			ObjectWrapper wrapper = GetWrapper();
			Honey darwin = new Honey(new string[] {"dickens", "of gaunt"});
			wrapper.WrappedInstance = darwin;
			wrapper.GetPropertyValue("AlsoKnownAs[1");
		}