public void SumMethodInFirstBusinessShouldWorks(int a, int b, int r) { IFirstBusiness firstBusiness = new FirstBusiness(null); int result = firstBusiness.Sum(a, b); Assert.Equal(r, result); }
public void ShuMethodShouldWorks() { IFirstBusiness firstBusiness = new FirstBusiness(null); int result = firstBusiness.Sum(1, 2); Assert.Equal(3, result); }
public async Task RedisShouldWorks(string user, string name, string res) { var mockDependency1 = new Mock <IRedisRepository>(); mockDependency1.Setup(d => d.GetUser(user)).Returns(async() => await Task.Run(() => name)); IFirstBusiness firstBusiness = new FirstBusiness(mockDependency1.Object); string result = await firstBusiness.UserHandlerAsync(user, name); Assert.Equal(res, result); }
public InternalInjectionController(FirstBusiness firstBusiness) { _firstBusiness = firstBusiness ?? throw new ArgumentNullException(nameof(firstBusiness)); }