public void Cloud_auth_object_returns_project_id() { var mockContext = new MockContext<CloudAuthenticator>(); mockContext.Arrange(f => f.GetProjectId()).Returns("ProjectId"); var cloudAuthMock = new CloudAuthenticatorMock(mockContext); var result = cloudAuthMock.GetProjectId(); mockContext.Assert(f => f.GetProjectId(), Invoked.Once); Assert.Equal("ProjectId", result); }
public void Cloud_auth_object_returns_project_id() { var mockContext = new MockContext <CloudAuthenticator>(); mockContext.Arrange(f => f.GetProjectId()).Returns("ProjectId"); var cloudAuthMock = new CloudAuthenticatorMock(mockContext); var result = cloudAuthMock.GetProjectId(); mockContext.Assert(f => f.GetProjectId(), Invoked.Once); Assert.Equal("ProjectId", result); }
public void Cloud_auth_object_returns_initializer() { var initializer = new BaseClientService.Initializer(); var mockContext = new MockContext<CloudAuthenticator>(); mockContext.Arrange(f => f.GetInitializer()).Returns(initializer); var cloudAuthMock = new CloudAuthenticatorMock(mockContext); var result = cloudAuthMock.GetInitializer(); mockContext.Assert(f => f.GetInitializer(), Invoked.Once); Assert.Equal(initializer, result); }
public void Cloud_auth_object_returns_initializer() { var initializer = new BaseClientService.Initializer(); var mockContext = new MockContext <CloudAuthenticator>(); mockContext.Arrange(f => f.GetInitializer()).Returns(initializer); var cloudAuthMock = new CloudAuthenticatorMock(mockContext); var result = cloudAuthMock.GetInitializer(); mockContext.Assert(f => f.GetInitializer(), Invoked.Once); Assert.Equal(initializer, result); }