コード例 #1
0
        public void BeforeEach()
        {
            _storage     = Substitute.For <IStorage <ISaveRestoreCopy> >();
            _saveRestore = new SaveRestoreCollection <ISaveRestoreCopy>(_storage);

            _obj = Substitute.For <ISaveRestoreCopy>();
            _obj.Save().Returns((x) => "asdf");
            _obj.Id.Returns((x) => "id");

            _list = new List <ISaveRestoreCopy> {
                _obj
            };
        }
コード例 #2
0
 private void Awake()
 {
     _storage = new Storage <DataExample>(_dataLibrary);
     _addData.ForEach(i => _copies.Add(i.GetCopy()));
     _saveRestore = new SaveRestoreCollection <DataExample>(_storage);
 }