private SingletonShapes() { ShapeDto m_NewShapes = JsonConvert.DeserializeObject <ShapeDto>(File.ReadAllText(Path.Combine(Environment.CurrentDirectory, TestConstants.SHAPES_FILE_01_PATH))); m_Shapes.AddRange(m_NewShapes.Hexagons); m_Shapes.AddRange(m_NewShapes.Stars); m_Shapes.AddRange(m_NewShapes.Circles); }
public void CanSerializeJson_True() { var got = new ShapeDto() { Hexagons = SampleShapes.Hexagons.Cast <Hexagon>().ToList(), Circles = SampleShapes.Circles.Cast <Circle>().ToList(), Stars = SampleShapes.Stars.Cast <Star>().ToList() }; File.WriteAllText(Path.Combine(Environment.CurrentDirectory, TestConstants.SHAPES_FILE_01_PATH), JsonConvert.SerializeObject(got)); Assert.True(true); }
public void CanDeserializeJson_True() { ShapeDto m_NewShapes = JsonConvert.DeserializeObject <ShapeDto>(File.ReadAllText(Path.Combine(Environment.CurrentDirectory, TestConstants.SHAPES_FILE_01_PATH))); Assert.True(true); }