public void WriteAndRead() { var path = "test"; var data1 = new DataContainer { value = 42 }; Assert.True(_service.WriteToFile(path, data1)); Assert.True(_service.ReadFromFile(path, out DataContainer data2)); Assert.AreEqual(data1.value, data2.value); }