public void LoadContentAsTest() { RunBeforeTests(_listTest); var fileManager = new JsonFileManager(); var resultingObject = fileManager.LoadContentAs <IEnumerable <FieldConfig> >(FilePath); var fieldConfigs = resultingObject.ToList(); var top1 = fieldConfigs.FirstOrDefault(); Assert.IsNotNull(top1); Assert.IsTrue(top1.Required); }
public void PersistContentTest() { _listTest.Add(new FieldConfig { Name = "Test 2", IsVisible = false, Required = false }); RunBeforeTests(_listTest); var fileManager = new JsonFileManager(); var resultingObject = fileManager.LoadContentAs <IEnumerable <FieldConfig> >(FilePath); var fieldConfigs = resultingObject.ToList(); Assert.IsTrue(fieldConfigs.Count == 2); }