GetUser() public static méthode

Gets a default IWebHookUser implementation which is used if none are registered with the Dependency Injection engine.
public static GetUser ( ) : IWebHookUser
Résultat IWebHookUser
        public void GetUser_ReturnsSingleInstance()
        {
            // Act
            IWebHookUser actual1 = CustomServices.GetUser();
            IWebHookUser actual2 = CustomServices.GetUser();

            // Assert
            Assert.Same(actual1, actual2);
        }
        public void SetUser_GetUser_Roundtrips()
        {
            // Arrange
            Mock <IWebHookUser> userMock = new Mock <IWebHookUser>();

            // Act
            CustomServices.SetUser(userMock.Object);
            IWebHookUser actual = CustomServices.GetUser();

            // Assert
            Assert.Same(userMock.Object, actual);
        }