public void SetViaGenerics() { var dataStore = new HttpApplicationStateBaseDataStoreAdapter(ApplicationStateMock.Object); dataStore.Set<int>(5); Assert.Equal(5, dataStore.Get<int>()); ApplicationStateMock.Verify(st => st.Set(typeof(int).AssemblyQualifiedName, 5), Times.Once()); }
public void SetViaKey() { var dataStore = new HttpApplicationStateBaseDataStoreAdapter(ApplicationStateMock.Object); dataStore.Set("aKey", "thing"); ApplicationStateMock.Verify(st => st.Set("aKey", "thing"), Times.Once()); }