38 writes to EditContext
Microsoft.AspNetCore.Components.Web.Tests (38)
Forms\InputBaseTest.cs (21)
16
var rootComponent = new TestInputHostComponent<string, TestInputComponent<string>> {
EditContext
= new EditContext(model), ValueExpression = () => model.StringProperty };
20
rootComponent.
EditContext
= new EditContext(model);
30
var rootComponent = new TestInputHostComponent<string, TestInputComponent<string>> {
EditContext
= new EditContext(model) };
44
EditContext
= new EditContext(model),
63
EditContext
= new EditContext(model),
82
EditContext
= new EditContext(model),
101
EditContext
= new EditContext(model),
140
EditContext
= new EditContext(model),
163
EditContext
= new EditContext(model),
185
EditContext
= new EditContext(model),
206
EditContext
= new EditContext(model),
244
EditContext
= new EditContext(model),
265
EditContext
= new EditContext(model),
283
EditContext
= new EditContext(model),
313
EditContext
= new EditContext(model),
347
EditContext
= new EditContext(model),
371
EditContext
= new EditContext(model),
407
EditContext
= new EditContext(model),
435
EditContext
= invalidContext,
468
EditContext
= invalidContext,
500
EditContext
= new EditContext(model),
Forms\InputDateTest.cs (2)
15
EditContext
= new EditContext(model),
41
EditContext
= new EditContext(model),
Forms\InputNumberTest.cs (3)
30
EditContext
= new EditContext(model),
56
EditContext
= new EditContext(model),
74
EditContext
= new EditContext(model),
Forms\InputSelectTest.cs (10)
15
EditContext
= new EditContext(model),
34
EditContext
= new EditContext(model),
53
EditContext
= new EditContext(model),
72
EditContext
= new EditContext(model),
92
EditContext
= new EditContext(model),
113
EditContext
= new EditContext(model),
134
EditContext
= new EditContext(model),
154
EditContext
= new EditContext(model),
173
EditContext
= new EditContext(model),
199
EditContext
= new EditContext(model),
Forms\InputTextAreaTest.cs (1)
15
EditContext
= new EditContext(model),
Forms\InputTextTest.cs (1)
15
EditContext
= new EditContext(model),
27 references to EditContext
Microsoft.AspNetCore.Components.Web.Tests (27)
Forms\InputBaseTest.cs (23)
72
Assert.Same(rootComponent.
EditContext
, inputComponent.EditContext);
190
Assert.False(rootComponent.
EditContext
.IsModified(() => model.StringProperty));
196
Assert.True(rootComponent.
EditContext
.IsModified(() => model.StringProperty));
216
rootComponent.
EditContext
.NotifyFieldChanged(fieldIdentifier);
220
var messages = new ValidationMessageStore(rootComponent.
EditContext
);
225
rootComponent.
EditContext
.MarkAsUnmodified(fieldIdentifier);
254
rootComponent.
EditContext
.NotifyFieldChanged(fieldIdentifier);
290
rootComponent.
EditContext
.OnValidationStateChanged += (sender, eventArgs) => { numValidationStateChanges++; };
300
Assert.True(rootComponent.
EditContext
.IsModified(fieldIdentifier));
301
Assert.Empty(rootComponent.
EditContext
.GetValidationMessages(fieldIdentifier));
320
rootComponent.
EditContext
.OnValidationStateChanged += (sender, eventArgs) => { numValidationStateChanges++; };
325
Assert.True(rootComponent.
EditContext
.IsModified(fieldIdentifier));
326
Assert.Equal(new[] { "Bad date value" }, rootComponent.
EditContext
.GetValidationMessages(fieldIdentifier));
335
Assert.True(rootComponent.
EditContext
.IsModified(fieldIdentifier));
336
Assert.Empty(rootComponent.
EditContext
.GetValidationMessages(fieldIdentifier));
355
Assert.Equal(new[] { "Bad date value" }, rootComponent.
EditContext
.GetValidationMessages(fieldIdentifier));
361
Assert.Empty(rootComponent.
EditContext
.GetValidationMessages(fieldIdentifier));
388
var messageStore = new ValidationMessageStore(rootComponent.
EditContext
);
390
await renderer.Dispatcher.InvokeAsync(rootComponent.
EditContext
.NotifyValidationStateChanged);
418
var messageStore = new ValidationMessageStore(rootComponent.
EditContext
);
420
await renderer.Dispatcher.InvokeAsync(rootComponent.
EditContext
.NotifyValidationStateChanged);
505
var messageStore = new ValidationMessageStore(rootComponent.
EditContext
);
521
await renderer.Dispatcher.InvokeAsync(rootComponent.
EditContext
.NotifyValidationStateChanged);
Forms\InputDateTest.cs (1)
29
var validationMessages = rootComponent.
EditContext
.GetValidationMessages(fieldIdentifier);
Forms\InputNumberTest.cs (1)
44
var validationMessages = rootComponent.
EditContext
.GetValidationMessages(fieldIdentifier);
Forms\InputSelectTest.cs (1)
187
var validationMessages = rootComponent.
EditContext
.GetValidationMessages(fieldIdentifier);
Forms\TestInputHostComponent.cs (1)
25
builder.AddComponentParameter(1, "Value",
EditContext
);