public void TestApiAppliesApiParticipantsCorrectly() { IApi api = new TestApiWithParticipants(); var configuration = api.Context.Configuration; Assert.True(configuration.GetProperty<bool>("Test1")); Assert.True(configuration.GetProperty<bool>("Test2")); var context = api.Context; Assert.True(context.GetProperty<bool>("Test1")); Assert.Same(api, context.GetProperty("Test1.Self")); Assert.True(context.GetProperty<bool>("Test2")); Assert.Same(api, context.GetProperty("Test2.Self")); (api as IDisposable).Dispose(); Assert.False(context.GetProperty<bool>("Test2")); Assert.False(context.GetProperty<bool>("Test1")); }
public void TestApiAppliesApiParticipantsCorrectly() { ApiBase api = new TestApiWithParticipants(); var configuration = api.Context.Configuration; Assert.True(configuration.GetProperty <bool>("Test1")); Assert.True(configuration.GetProperty <bool>("Test2")); var context = api.Context; Assert.True(context.GetProperty <bool>("Test1")); Assert.Same(api, context.GetProperty("Test1.Self")); Assert.True(context.GetProperty <bool>("Test2")); Assert.Same(api, context.GetProperty("Test2.Self")); (api as IDisposable).Dispose(); Assert.False(context.GetProperty <bool>("Test2")); Assert.False(context.GetProperty <bool>("Test1")); }