File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Src/Notion.Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks
Test/Notion.IntegrationTests Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ using Newtonsoft . Json ;
2
+
3
+ namespace Notion . Client
4
+ {
5
+ public class EquationUpdateBlock : UpdateBlock , IUpdateBlock
6
+ {
7
+ [ JsonProperty ( "equation" ) ]
8
+ public Data Equation { get ; set ; }
9
+
10
+ public class Data
11
+ {
12
+ [ JsonProperty ( "expression" ) ]
13
+ public string Expression { get ; set ; }
14
+ }
15
+ }
16
+ }
Original file line number Diff line number Diff line change @@ -239,6 +239,25 @@ private static IEnumerable<object[]> BlockData()
239
239
Assert . Equal ( "https://github.com/notion-dotnet/notion-sdk-net" , updatedBlock . Bookmark . Url ) ;
240
240
Assert . Equal ( "Github" , updatedBlock . Bookmark . Caption . OfType < RichTextText > ( ) . First ( ) . Text . Content ) ;
241
241
} )
242
+ } ,
243
+ new object [ ] {
244
+ new EquationBlock
245
+ {
246
+ Equation = new EquationBlock . Info
247
+ {
248
+ Expression = "e=mc^3"
249
+ }
250
+ } ,
251
+ new EquationUpdateBlock {
252
+ Equation = new EquationUpdateBlock . Data
253
+ {
254
+ Expression = "e=mc^2"
255
+ }
256
+ } ,
257
+ new Action < Block > ( ( block ) => {
258
+ var updatedBlock = ( EquationBlock ) block ;
259
+ Assert . Equal ( "e=mc^2" , updatedBlock . Equation . Expression ) ;
260
+ } )
242
261
}
243
262
} ;
244
263
}
You can’t perform that action at this time.
0 commit comments