public void It_should_save_connections() { var expectedData = CreateContent(); var storage = new EncryptedStorage { Parameters = { FileName = this.fileName, Password = "******" }, Data = expectedData }; storage.Save(); storage.Read(); storage.Data.Connections.Should().Have.SameSequenceAs(expectedData.Connections); }
public void It_should_save_and_restore_settings_relations() { var expectedData = CreateContent(); var storage = new EncryptedStorage { Parameters = { FileName = this.fileName, Password = "******" }, Data = expectedData }; storage.Save(); storage.Read(); var actualData = storage.Data; actualData.SharedSettings.Should().Have.Count.EqualTo(2); actualData.Connections.Select(c => c.SharedSettingsName) .Should() .Have.SameSequenceAs(expectedData.Connections.Select(c => c.SharedSettingsName)); actualData.Connections[2].SharedSettings.Should().Be.SameInstanceAs(actualData.Connections[3].SharedSettings); }