public void SetTest <T>(string key, T value) { var atom = new DictionaryAtom(); atom.Set(key, value); atom.ContainsKey(key).Should().BeTrue(); }
public void ContainsKeyTest() { const string key = "test"; const int value = 5000; var atom = new DictionaryAtom(); atom.Set(key, value); atom.ContainsKey(key).Should().BeTrue(); }
public void SetListAtom() { var listAtom = new ListAtom { "1 2 3 4 5" }; var atom = new DictionaryAtom(); atom.Set("TestList", listAtom); atom.ContainsKey("TestList").Should().BeTrue(); var foundAtom = atom.GetAtom <ListAtom>("TestList"); foundAtom.Should().NotBeNull(); foundAtom.Should().BeAssignableTo <ListAtom>(); foundAtom.GetString(0).Should().Be("1 2 3 4 5"); }
public void SetDictionaryAtom() { var setAtom = new DictionaryAtom(); setAtom.Set("Test", "1 2 3 4 5"); var atom = new DictionaryAtom(); atom.Set("TestDictionary", setAtom); atom.ContainsKey("TestDictionary").Should().BeTrue(); var foundAtom = atom.GetAtom <DictionaryAtom>("TestDictionary"); foundAtom.Should().NotBeNull(); foundAtom.Should().BeAssignableTo <DictionaryAtom>(); foundAtom.ContainsKey("Test").Should().BeTrue(); }