-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Neo Plugins UT] Add RpcServer Unit Tests Part Blockchain. (#3339)
* try mock * not use mock * test * fix test * use neo testutils * complete rpcserver blockchain tests. * revert change to ByteArrayComparer * revert cache change * add more detail to comments * add more exception test cases * fix warning * Apply suggestions from code review * update TODO mark * Update src/Plugins/RpcServer/RpcServer.Blockchain.cs Co-authored-by: Anna Shaleva <[email protected]> * Update src/Plugins/RpcServer/RpcServer.Blockchain.cs Co-authored-by: Anna Shaleva <[email protected]> * Update src/Plugins/RpcServer/RpcServer.Blockchain.cs Co-authored-by: Anna Shaleva <[email protected]> * Update src/Plugins/RpcServer/RpcServer.Blockchain.cs Co-authored-by: Anna Shaleva <[email protected]> * Update src/Plugins/RpcServer/RpcServer.Blockchain.cs Co-authored-by: Anna Shaleva <[email protected]> --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Anna Shaleva <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]>
- Loading branch information
1 parent
e281dcd
commit 07fb5ce
Showing
15 changed files
with
1,003 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tests/Neo.Plugins.RpcServer.Tests/TestMemoryStoreProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (C) 2015-2024 The Neo Project. | ||
// | ||
// TestMemoryStoreProvider.cs file belongs to the neo project and is free | ||
// software distributed under the MIT software license, see the | ||
// accompanying file LICENSE in the main directory of the | ||
// repository or http://www.opensource.org/licenses/mit-license.php | ||
// for more details. | ||
// | ||
// Redistribution and use in source and binary forms with or without | ||
// modifications are permitted. | ||
|
||
using Neo.Persistence; | ||
|
||
namespace Neo.Plugins.RpcServer.Tests; | ||
|
||
public class TestMemoryStoreProvider(MemoryStore memoryStore) : IStoreProvider | ||
{ | ||
public MemoryStore MemoryStore { get; init; } = memoryStore; | ||
public string Name => nameof(MemoryStore); | ||
public IStore GetStore(string path) => MemoryStore; | ||
} |
Oops, something went wrong.