public async Task Test_Initialized_Is_Set_To_True_After_InitAsync_Is_Called() { var obj = new TestActivatableObject(); await obj.InitAsync(new TestParams()); obj.Initialized.Should().BeTrue(); }
public async Task Test_Activated_Resolves_After_Init_Is_Called() { var obj = new TestActivatableObject(); var first = new TestParams(); List <TestParams> recievedParams = new List <TestParams>(); obj.OnActivated.Subscribe(p => recievedParams.Add(p)); await obj.InitAsync(first); Assert.Collection(recievedParams, p => p.Should().Be(first)); }