public async Task Create_NoErrors_ReturnsTrue() { var triangles = new List <Triangle>(); _triangleRepsitoryMock.Setup(s => s.IntializeAsync(It.IsAny <IEnumerable <Triangle> >())) .Callback <IEnumerable <Triangle> >(c => triangles.AddRange(c)) .ReturnsAsync(true); var actual = await _triangleService.CreateAsync(); Assert.IsTrue(actual); var a1 = triangles.FirstOrDefault(f => f.Row == Row.A && f.Column == 1); Assert.IsNotNull(a1); Assert.IsTrue(a1.Vertices.Contains(new Vertex { X = 0, Y = 0 })); Assert.IsTrue(a1.Vertices.Contains(new Vertex { X = 0, Y = 10 })); Assert.IsTrue(a1.Vertices.Contains(new Vertex { X = 10, Y = 10 })); var d5 = triangles.FirstOrDefault(f => f.Row == Row.D && f.Column == 5); Assert.IsNotNull(d5); Assert.IsTrue(d5.Vertices.Contains(new Vertex { X = 20, Y = 30 })); Assert.IsTrue(d5.Vertices.Contains(new Vertex { X = 20, Y = 40 })); Assert.IsTrue(d5.Vertices.Contains(new Vertex { X = 30, Y = 40 })); var d6 = triangles.FirstOrDefault(f => f.Row == Row.D && f.Column == 6); Assert.IsNotNull(d6); Assert.IsTrue(d6.Vertices.Contains(new Vertex { X = 20, Y = 30 })); Assert.IsTrue(d6.Vertices.Contains(new Vertex { X = 30, Y = 30 })); Assert.IsTrue(d6.Vertices.Contains(new Vertex { X = 30, Y = 40 })); var f12 = triangles.FirstOrDefault(f => f.Row == Row.F && f.Column == 12); Assert.IsNotNull(f12); Assert.IsTrue(f12.Vertices.Contains(new Vertex { X = 50, Y = 50 })); Assert.IsTrue(f12.Vertices.Contains(new Vertex { X = 60, Y = 50 })); Assert.IsTrue(f12.Vertices.Contains(new Vertex { X = 60, Y = 60 })); }