public void GetStore_ReturnsSingleInstance() { // Act IWebHookStore actual1 = CustomServices.GetStore(); IWebHookStore actual2 = CustomServices.GetStore(); // Assert Assert.Same(actual1, actual2); }
public void SetStore_GetStore_Roundtrips() { // Arrange Mock <IWebHookStore> storeMock = new Mock <IWebHookStore>(); // Act CustomServices.SetStore(storeMock.Object); IWebHookStore actual = CustomServices.GetStore(); // Assert Assert.Same(storeMock.Object, actual); }
public void GetManager_ReturnsSingleInstance() { // Arrange ILogger logger = CommonServices.GetLogger(); IWebHookStore store = CustomServices.GetStore(); // Act IWebHookManager actual1 = CustomServices.GetManager(store, logger); IWebHookManager actual2 = CustomServices.GetManager(store, logger); // Assert Assert.Same(actual1, actual2); }