public void TestGetValueReturnsCastedObject() { var optimizelyJson = new OptimizelyJSON(Map, ErrorHandlerMock.Object, LoggerMock.Object); var expectedValue = optimizelyJson.ToDictionary(); var actualValue = optimizelyJson.GetValue <ParentJson>(null); Assert.IsTrue(TestData.CompareObjects(actualValue, expectedValue)); }
public void TestGetValueReturnsEntireDictWhenJsonPathIsEmptyAndTypeIsValid() { var optimizelyJSONUsingString = new OptimizelyJSON(Payload, ErrorHandlerMock.Object, LoggerMock.Object); var actualDict = optimizelyJSONUsingString.ToDictionary(); var expectedValue = optimizelyJSONUsingString.GetValue <Dictionary <string, object> >(""); Assert.NotNull(expectedValue); Assert.True(TestData.CompareObjects(expectedValue, actualDict)); }