public void Can_Draw_Background() { // Arrange var rayTracer = new RayTracer(200, 100); // Act rayTracer.RenderScene(); var fileName = "Can_Draw_Background.png"; rayTracer.Frame.SaveFrameBufferToDisk(TestContext.CurrentContext.WorkDirectory + "/" + fileName); // Assert Assert.That(VerifyImage(fileName), Is.True); }
public void Can_Draw_sphere_on_background() { // Arrange var rayTracer = new RayTracer(200, 100); var sphere = new Sphere(new Vec3(0, 0, -1), 0.5, new Vec3(1, 0, 0)); rayTracer.SceneObjects.Add(sphere); // Act rayTracer.RenderScene(); var fileName = $"{TestContext.CurrentContext.Test.MethodName}.png"; rayTracer.Frame.SaveFrameBufferToDisk(TestContext.CurrentContext.WorkDirectory + "/" + fileName); // Assert Assert.That(VerifyImage(fileName), Is.True); }