public void MultiArrayParamTest() { var splitter = new ParamKeySplitter(); var result = splitter.SplitKey("test[0][1][0]"); Assert.AreEqual(new[] { "test", "0", "1", "0" }, result); }
public void MultiObjectParamTest() { var splitter = new ParamKeySplitter(); var result = splitter.SplitKey("test[a][b][c]"); Assert.AreEqual(new[] { "test", "a", "b", "c" }, result); }
public void UnindexedArrayWithObjectParamTest() { var splitter = new ParamKeySplitter(); var result = splitter.SplitKey("employees[].FirstName"); Assert.AreEqual(new[] { "employees", "", "FirstName" }, result); }
public void ArrayWithObjectParamTest() { var splitter = new ParamKeySplitter(); var result = splitter.SplitKey("[0].FirstName"); Assert.AreEqual(new[] { "0", "FirstName" }, result); }
public void ObjectArrayObjectParamTest() { var splitter = new ParamKeySplitter(); var result = splitter.SplitKey("test.array[0][subkey]"); Assert.AreEqual(new[] { "test", "array", "0", "subkey" }, result); }
public void SingleParamTest() { var splitter = new ParamKeySplitter(); var result = splitter.SplitKey("test"); Assert.AreEqual(new [] { "test" }, result); }
public void MultiObjectWithDotNotationParamTest() { var splitter = new ParamKeySplitter(); var result = splitter.SplitKey("test.a.b.c"); Assert.AreEqual(new[] { "test", "a", "b", "c" }, result); }