예제 #1
0
        public void Load_ReturnsEmptyObject_WhenNoSavedObjectExists()
        {
            var fileSystem = new MockFileSystem();
            var store      = new MacEncryptedStore <UserSettings>(fileSystem);

            var result = store.Load();

            result.Should().BeEquivalentTo(new UserSettings());
        }
예제 #2
0
        public void Load_CorrectlyRestoresSavedValue()
        {
            var fileSystem = new MockFileSystem();
            var store      = new MacEncryptedStore <UserSettings>(fileSystem);
            var settings   = _fixture.Create <UserSettings>();

            store.Save(settings);

            var result = store.Load();

            result.Should().BeEquivalentTo(settings);
        }