public async void CreateTeam_Valid_Test() { //Arrange _adapterMock.Setup(r => r.Create(_team)).Returns(Task.FromResult(_team.Id)); var teamHandler = new TeamHandler(_adapterMock.Object); //Act var returnedId = await teamHandler.Create(_team); //Assert Assert.IsTrue(returnedId == _team.Id); }
public async void CreateTeam_Invalid_TeamInformationEmptyString_Test() { //Arrange _team.Name = ""; _team.MetaData = ""; _adapterMock.Setup(r => r.Create(_team)); var teamHandler = new TeamHandler(_adapterMock.Object); //Act var result = await teamHandler.Create(_team); //Assert //Exception must be thrown }
public async void CreateTeam_Invalid_NoTeamMember_Test() { //Arrange _team.UserIDs = new int[0]; _adapterMock.Setup(r => r.Create(_team)); var teamHandler = new TeamHandler(_adapterMock.Object); //Act var result = await teamHandler.Create(_team); //Assert //Exception must be thrown }